Package org.apache.myfaces.extensions.cdi.jsf.api.config.view

Examples of org.apache.myfaces.extensions.cdi.jsf.api.config.view.ViewConfigDescriptor


            return;
        }

        String viewId = viewRoot.getViewId();

        ViewConfigDescriptor viewDefinitionEntry = ViewConfigCache.getViewConfigDescriptor(viewId);

        if(viewDefinitionEntry == null)
        {
            return;
        }

        List<PageBeanDescriptor> beanEntries = viewDefinitionEntry.getPageBeanDescriptors();

        Object bean;
        RequestLifecycleCallbackEntry phasesLifecycleCallbackEntry;
        List<Method> lifecycleCallbacks;
View Full Code Here


        if(this.deactivated)
        {
            return;
        }
       
        ViewConfigDescriptor viewConfigDescriptor =
                ViewConfigCache.getViewConfigDescriptor(FacesContext.getCurrentInstance().getViewRoot().getViewId());

        if(viewConfigDescriptor instanceof EditableViewConfigDescriptor)
        {
            ((EditableViewConfigDescriptor)viewConfigDescriptor).invokePrePageActionMethods();
View Full Code Here

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

        ViewConfigDescriptor that = (ViewConfigDescriptor) o;

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

        return true;
View Full Code Here

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

        ViewConfigDescriptor newEntry = createViewConfigDescriptor(pageDefinitionClass);

        if(newEntry != null)
        {
            ViewConfigDescriptor existingDescriptor = ViewConfigCache.getViewConfigDescriptor(newEntry.getViewConfig());

            if(existingDescriptor instanceof EditableViewConfigDescriptor
                    && ((EditableViewConfigDescriptor)existingDescriptor).isPartialViewConfig())
            {
                //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(PageBeanDescriptor pageBeanDescriptor : existingDescriptor.getPageBeanDescriptors())
                {
                    //add page-beans to the real entry
                    if(newEntry instanceof EditableViewConfigDescriptor)
                    {
                        ((EditableViewConfigDescriptor)newEntry).addPageBean(pageBeanDescriptor.getBeanClass());
View Full Code Here

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

        for(Class<? extends ViewConfig> viewConfigClass : view.value())
        {
            ViewConfigDescriptor viewConfigDescriptor = ViewConfigCache.getViewConfigDescriptor(viewConfigClass);

            if(viewConfigDescriptor == null)
            {
                ViewConfigDescriptor entry = createViewConfigDescriptor(viewConfigClass);

                if(entry != null)
                {
                    if(entry instanceof EditableViewConfigDescriptor)
                    {
                        ((EditableViewConfigDescriptor)entry).addPageBean(annotatedType.getJavaClass());
                        ((EditableViewConfigDescriptor)entry).setPartialViewConfig(true);
                    }

                    ViewConfigCache.addViewConfigDescriptor(entry.getViewId(), entry);
                }
            }
            else
            {
                if(viewConfigDescriptor instanceof EditableViewConfigDescriptor)
View Full Code Here

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

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

        if(oldViewId == null)
        {
            return;
        }

        ViewConfigDescriptor entry = ViewConfigCache.getViewConfigDescriptor(oldViewId);

        if(entry == null)
        {
            return;
        }
View Full Code Here

    private static void tryToStorePageAsDefaultErrorPage(ViewConfigDescriptor viewDefinitionEntry)
    {
        if(DefaultErrorView.class.isAssignableFrom(viewDefinitionEntry.getViewConfig()))
        {
            ViewConfigDescriptor currentErrorView = getDefaultErrorViewConfigDescriptor();
            if(currentErrorView != null)
            {
                throw ambiguousDefaultErrorViewDefinitionException(viewDefinitionEntry.getViewConfig(),
                                                                   currentErrorView.getViewConfig());
            }

            setDefaultErrorView(viewDefinitionEntry);
        }
    }
View Full Code Here

     * {@inheritDoc}
     */
    public EditableViewConfigDescriptor extractViewConfig(Class<? extends ViewConfig> viewDefinitionClass)
    {
        //use the interface to make clear which information we really need
        ViewConfigDescriptor viewConfigDescriptor = new ExtractedViewConfigDefinitionEntry(viewDefinitionClass);

        return extractViewConfigDescriptor(viewDefinitionClass, viewConfigDescriptor);
    }
View Full Code Here

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

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

        return extractViewConfigDescriptor(viewDefinitionClass, viewConfigDescriptor);
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.extensions.cdi.jsf.api.config.view.ViewConfigDescriptor

Copyright © 2018 www.massapicom. 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.