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

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


    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


        if(oldViewId == null)
        {
            return;
        }

        ViewConfigDescriptor entry = ViewConfigCache.getViewConfigDescriptor(oldViewId);

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

        //we have to use it as current view if an AccessDecisionVoter uses the JSF API to check access to the view-id
        context.setViewRoot(result);

        try
        {
            ViewConfigDescriptor entry = ViewConfigCache.getViewConfigDescriptor(result.getViewId());

            if(entry != null)
            {
                lazyInit();

                Class<? extends ViewConfig> errorView = null;

                if(entry instanceof EditableViewConfigDescriptor)
                {
                    errorView = ((EditableViewConfigDescriptor)entry).getErrorView();
                }

                invokeVoters(null /*TODO*/, this.beanManager, entry.getAccessDecisionVoters(), errorView);
            }
        }
        catch (AccessDeniedException accessDeniedException)
        {
            Class<? extends ViewConfig> errorView =
View Full Code Here

        }
    }

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

        if(entry == null)
        {
            return;
        }

        try
        {
            Class<? extends ViewConfig> errorView = null;

            if(entry instanceof EditableViewConfigDescriptor)
            {
                errorView = ((EditableViewConfigDescriptor)entry).getErrorView();
            }
            invokeVoters(null, beanManager, entry.getAccessDecisionVoters(), errorView);
        }
        catch (AccessDeniedException accessDeniedException)
        {
            tryToHandleSecurityViolation(accessDeniedException);
            facesContext.renderResponse();
View Full Code Here

        //we have to use it as current view if an AccessDecisionVoter uses the JSF API to check access to the view-id
        context.setViewRoot(result);

        try
        {
            ViewConfigDescriptor entry = ViewConfigCache.getViewConfigDescriptor(result.getViewId());

            if(entry != null)
            {
                lazyInit();

                Class<? extends ViewConfig> errorView = null;

                if(entry instanceof EditableViewConfigDescriptor)
                {
                    errorView = ((EditableViewConfigDescriptor)entry).getErrorView();
                }

                invokeVoters(null /*TODO*/, this.beanManager, entry.getAccessDecisionVoters(), errorView);
            }
        }
        catch (AccessDeniedException accessDeniedException)
        {
            Class<? extends ViewConfig> errorView =
View Full Code Here

        }
    }

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

        if(entry == null)
        {
            return;
        }

        try
        {
            Class<? extends ViewConfig> errorView = null;

            if(entry instanceof EditableViewConfigDescriptor)
            {
                errorView = ((EditableViewConfigDescriptor)entry).getErrorView();
            }
            invokeVoters(null, beanManager, entry.getAccessDecisionVoters(), errorView);
        }
        catch (AccessDeniedException accessDeniedException)
        {
            tryToHandleSecurityViolation(accessDeniedException);
            facesContext.renderResponse();
View Full Code Here

            errorView = inlineErrorView;
        }

        if(errorView == null)
        {
            ViewConfigDescriptor errorPageDescriptor = ViewConfigCache.getDefaultErrorViewConfigDescriptor();

            if(errorPageDescriptor != null)
            {
                errorView = errorPageDescriptor.getViewConfig();
            }
        }

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

        }

        //override the view-id if we have a new view
        this.windowContext.setAttribute(INITIALIZED_VIEW_ID_MARKER_KEY, viewId);

        ViewConfigDescriptor viewDefinitionEntry = ViewConfigCache.getViewConfigDescriptor(viewId);

        if (viewDefinitionEntry instanceof EditableViewConfigDescriptor)
        {
            ((EditableViewConfigDescriptor)viewDefinitionEntry).invokeInitViewMethods();
        }
View Full Code Here

        }
    }

    private void processPreRenderView(String viewId)
    {
        ViewConfigDescriptor viewDefinitionEntry = ViewConfigCache.getViewConfigDescriptor(viewId);

        if (viewDefinitionEntry instanceof EditableViewConfigDescriptor)
        {
            ((EditableViewConfigDescriptor)viewDefinitionEntry).invokePreRenderViewMethods();
        }
View Full Code Here

        }
    }

    private void processPostRenderView(String viewId)
    {
        ViewConfigDescriptor viewDefinitionEntry = ViewConfigCache.getViewConfigDescriptor(viewId);

        if (viewDefinitionEntry instanceof EditableViewConfigDescriptor)
        {
            ((EditableViewConfigDescriptor)viewDefinitionEntry).invokePostRenderViewMethods();
        }
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.