Package org.apache.myfaces.extensions.cdi.jsf.impl.config.view.spi

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


        }
    }

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

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


            return;
        }

        String viewId = viewRoot.getViewId();

        ViewConfigEntry viewDefinitionEntry = ViewConfigCache.getViewDefinition(viewId);

        if(viewDefinitionEntry == null)
        {
            return;
        }

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

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

        if(this.deactivated)
        {
            return;
        }
       
        ViewConfigEntry viewConfigEntry =
                ViewConfigCache.getViewDefinition(FacesContext.getCurrentInstance().getViewRoot().getViewId());

        if(viewConfigEntry != null)
        {
            viewConfigEntry.invokePrePageActionMethods();
        }

        this.wrapped.processAction(actionEvent);
    }
View Full Code Here

    private static void tryToStorePageAsDefaultErrorPage(ViewConfigEntry viewDefinitionEntry)
    {
        if(DefaultErrorView.class.isAssignableFrom(viewDefinitionEntry.getViewDefinitionClass()))
        {
            ViewConfigEntry currentErrorView = getDefaultErrorView();
            if(currentErrorView != null)
            {
                throw ambiguousDefaultErrorViewDefinitionException(viewDefinitionEntry.getViewDefinitionClass(),
                                                                   currentErrorView.getViewDefinitionClass());
            }

            setDefaultErrorView(viewDefinitionEntry);
        }
    }
View Full Code Here

        if(inlineViewConfigEntryList == null)
        {
            return;
        }

        ViewConfigEntry viewConfigEntry;
        for(InlineViewConfigEntry inlineViewConfigEntry : inlineViewConfigEntryList)
        {
            viewConfigEntry = inlineViewConfigEntry.getViewConfigExtractor()
                    .extractInlineViewConfig(inlineViewConfigEntry.getViewConfigDefinition());

            if(viewConfigEntry != null)
            {
                //activate view controller annotations
                viewConfigEntry.addPageBean(viewConfigEntry.getViewDefinitionClass());

                storeViewDefinition(viewConfigEntry.getViewId(), viewConfigEntry, false, false);
            }
        }

        inlineViewDefinitionEntryList.put(getClassloader(), null);
    }
View Full Code Here

        }
    }

    private void checkPermission(BeanManager beanManager, FacesContext facesContext)
    {
        ViewConfigEntry entry = ViewConfigCache.getViewDefinition(facesContext.getViewRoot().getViewId());

        if(entry == null)
        {
            return;
        }

        try
        {
            invokeVoters(null, beanManager, entry.getAccessDecisionVoters(), entry.getErrorView());
        }
        catch (AccessDeniedException accessDeniedException)
        {
            tryToHandleSecurityViolation(accessDeniedException);
            facesContext.renderResponse();
View Full Code Here

            errorView = inlineErrorView;
        }

        if(errorView == null)
        {
            ViewConfigEntry errorPageEntry = ViewConfigCache.getDefaultErrorView();

            if(errorPageEntry != null)
            {
                errorView = errorPageEntry.getViewDefinitionClass();
            }
        }

        if(errorView == null)
        {
View Full Code Here

                //it isn't possible to support interfaces due to cdi restrictions
                if(outcome.startsWith("class "))
                {
                    outcome = outcome.substring(6);
                }
                ViewConfigEntry entry = this.viewConfigs.get(outcome);

                if(entry == null)
                {
                    if(DefaultErrorView.class.getName().equals(originalOutcome))
                    {
                        entry = ViewConfigCache.getDefaultErrorView();
                    }
                }
               
                if(entry == null)
                {
                    Object loadedClass = tryToLoadClassForName(outcome);

                    if(loadedClass == null)
                    {
                        this.otherOutcomes.add(originalOutcome);
                    }
                    else if(ViewConfig.class.isAssignableFrom((Class)loadedClass))
                    {
                        //noinspection unchecked
                        entry = ViewConfigCache.getViewDefinition((Class<? extends ViewConfig>)loadedClass);
                    }
                }

                if(entry != null)
                {
                    //security
                    try
                    {
                        invokeVoters(null, this.beanManager, entry.getAccessDecisionVoters(), entry.getErrorView());
                    }
                    catch (AccessDeniedException accessDeniedException)
                    {
                        tryToHandleSecurityViolation(accessDeniedException);
                        return;
View Full Code Here

    private void handleStandardNavigation(FacesContext facesContext, String fromAction, String outcome)
    {
        //security
        try
        {
            ViewConfigEntry entry = ViewConfigCache.getViewDefinition(facesContext.getViewRoot().getViewId());

            if(entry != null)
            {
                invokeVoters(null, this.beanManager, entry.getAccessDecisionVoters(), entry.getErrorView());
            }
        }
        catch (AccessDeniedException accessDeniedException)
        {
            tryToHandleSecurityViolation(accessDeniedException);
View Full Code Here

    }

    private PreViewConfigNavigateEvent firePreViewConfigNavigateEvent(
            String oldViewId, ViewConfigEntry newViewConfigEntry)
    {
        ViewConfigEntry oldViewConfigEntry = ViewConfigCache.getViewDefinition(oldViewId);

        if(oldViewConfigEntry != null)
        {
            PreViewConfigNavigateEvent navigateEvent = new PreViewConfigNavigateEvent(
                    oldViewConfigEntry.getViewDefinitionClass(), newViewConfigEntry.getViewDefinitionClass());

            this.beanManager.fireEvent(navigateEvent);
            return navigateEvent;
        }
        return null;
View Full Code Here

TOP

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

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.