Examples of ViewConfigEntry


Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

        if (!(o instanceof ViewConfigEntry))
        {
            return false;
        }

        ViewConfigEntry that = (ViewConfigEntry) o;

        if (!viewId.equals(that.getViewId()))
        {
            return false;
        }

        return true;
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

        if (!(o instanceof ViewConfigEntry))
        {
            return false;
        }

        ViewConfigEntry that = (ViewConfigEntry) o;

        if (!viewId.equals(that.getViewId()))
        {
            return false;
        }

        return true;
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

        if(this.logger.isLoggable(Level.INFO))
        {
            this.logger.info(pageDefinitionClass.getName() + " will be used as page-definition.");
        }

        ViewConfigEntry newEntry = createViewConfigEntry(pageDefinitionClass);

        if(newEntry != null)
        {
            ViewConfigEntry existingEntry = ViewConfigCache.getViewDefinition(newEntry.getViewDefinitionClass());

            //TODO introduce an SPI with a better name
            if(/*viewConfigEntry != null*/existingEntry instanceof DefaultViewConfigEntry
                    && ((DefaultViewConfigEntry)existingEntry).isSimpleEntryMode())
            {
                //in this case the alternative view-controller approach which just adds page-beans was invoked before
                //-> we just have to use the page bean of the existing entry

                //here we have a simple-entry!   (which just contains page-bean definitions)
                for(PageBeanConfigEntry pageBeanConfigEntry : existingEntry.getPageBeanDefinitions())
                {
                    //add page-beans to the real entry
                    newEntry.addPageBean(pageBeanConfigEntry.getBeanClass());
                }
                ViewConfigCache.replaceViewDefinition(newEntry.getViewId(), newEntry);
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

            this.logger.info(annotatedType.getJavaClass().getName() + " will be used as page-bean.");
        }

        for(Class<? extends ViewConfig> viewConfigClass : view.value())
        {
            ViewConfigEntry viewConfigEntry = ViewConfigCache.getViewDefinition(viewConfigClass);

            if(viewConfigEntry == null)
            {
                ViewConfigEntry entry = createViewConfigEntry(viewConfigClass);

                if(entry != null)
                {
                    entry.addPageBean(annotatedType.getJavaClass());

                    //TODO introduce an SPI with a better name
                    if(entry instanceof DefaultViewConfigEntry)
                    {
                        ((DefaultViewConfigEntry)entry).activateSimpleEntryMode();
                    }
                    ViewConfigCache.addViewDefinition(entry.getViewId(), entry);
                }
            }
            else
            {
                viewConfigEntry.addPageBean(annotatedType.getJavaClass());
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

        if(Modifier.isAbstract(viewDefinitionClass.getModifiers()))
        {
            return null;
        }

        ViewConfigEntry result = getViewConfigExtractor().extractViewConfig(viewDefinitionClass);
        return result;
    }
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

    private static final long serialVersionUID = 5794817257216134993L;

    public ViewConfigEntry extractViewConfig(Class<? extends ViewConfig> viewDefinitionClass)
    {
        //use the interface to make clear which information we really need
        ViewConfigEntry viewConfigEntry = new ExtractedViewConfigDefinitionEntry(viewDefinitionClass);

        return extractViewConfigEntry(viewDefinitionClass, viewConfigEntry);
    }
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

        {
            basePath = null; //both are in the same package
        }

        //use the interface to make clear which information we really need
        ViewConfigEntry viewConfigEntry = new ExtractedInlineViewConfigDefinitionEntry(viewDefinitionClass, basePath);

        return extractViewConfigEntry(viewDefinitionClass, viewConfigEntry);
    }
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

    protected void initBeans(
            @Observes @BeforePhase(JsfPhaseId.RENDER_RESPONSE) PhaseEvent event, BeanManager beanManager)
    {
        String viewId = event.getFacesContext().getViewRoot().getViewId();

        ViewConfigEntry viewDefinitionEntry = ViewConfigCache.getViewDefinition(viewId);

        if(viewDefinitionEntry == null)
        {
            return;
        }

        List<PageBeanConfigEntry> beanEntries = viewDefinitionEntry.getPageBeanDefinitions();

        for(PageBeanConfigEntry beanEntry : beanEntries)
        {
            //resolve bean to trigger @PostConstruct if it isn't scoped
            CodiUtils.getOrCreateScopedInstanceOfBeanByName(beanManager, beanEntry.getBeanName(), Object.class);
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

            return;
        }

        this.windowContext.setAttribute(INITIALIZED_VIEW_ID_MARKER_KEY, viewId);

        ViewConfigEntry viewDefinitionEntry = ViewConfigCache.getViewDefinition(viewId);

        if (viewDefinitionEntry != null)
        {
            viewDefinitionEntry.invokeInitViewMethods();
        }
    }
View Full Code Here

Examples of org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi.ViewConfigEntry

        }
    }

    private void processPreRenderView(String viewId)
    {
        ViewConfigEntry viewDefinitionEntry = ViewConfigCache.getViewDefinition(viewId);

        if (viewDefinitionEntry != null)
        {
            viewDefinitionEntry.invokePreRenderViewMethods();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.