Package javax.faces.application

Examples of javax.faces.application.ViewHandler.calculateRenderKitId()


    @Override
    public UIViewRoot restoreView(FacesContext facesContext, String viewId)
    {
        Application application = facesContext.getApplication();
        ViewHandler applicationViewHandler = application.getViewHandler();
        String renderKitId = applicationViewHandler.calculateRenderKitId(facesContext);
        String calculatedViewId = getViewHandlerSupport().calculateViewId(facesContext, viewId);
        UIViewRoot viewRoot = application.getStateManager().restoreView(facesContext, calculatedViewId, renderKitId);
        return viewRoot;
    }
View Full Code Here


                // If not, this method must call calculateLocale() and calculateRenderKitId(), and store the results
                // as the values of the locale and renderKitId, proeprties, respectively, of the newly created
                // UIViewRoot.
                ViewHandler handler = application.getViewHandler();
                newViewRoot.setLocale(handler.calculateLocale(context));
                newViewRoot.setRenderKitId(handler.calculateRenderKitId(context));
            }
            else
            {
                // If there is an existing UIViewRoot available on the FacesContext, this method must copy its locale
                // and renderKitId to this new view root
View Full Code Here

        Application application = context.getApplication();
       
        ViewHandler applicationViewHandler = application.getViewHandler();
       
        String renderKitId = applicationViewHandler.calculateRenderKitId(context);

        UIViewRoot viewRoot = application.getStateManager().restoreView(context, viewId, renderKitId);

        return viewRoot;
    }
View Full Code Here

    }

    public boolean isPostback(FacesContext facesContext)
    {
        ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
        String renderkitId = viewHandler.calculateRenderKitId(facesContext);
        ResponseStateManager rsm
                = getRenderKitFactory().getRenderKit(facesContext, renderkitId).getResponseStateManager();
        return rsm.isPostback(facesContext);
    }
   
View Full Code Here

        expect(_application.getViewHandler()).andReturn(viewHandler);
        expect(_facesContext.getViewRoot()).andReturn(null);
        UIViewRoot viewRoot = _mocksControl.createMock(UIViewRoot.class);
        expect(_application.createComponent(eq(UIViewRoot.COMPONENT_TYPE))).andReturn(viewRoot);

        expect(viewHandler.calculateRenderKitId(same(_facesContext))).andReturn("renderkitid");
        Locale locale = new Locale("xxx");
        expect(viewHandler.calculateLocale(same(_facesContext))).andReturn(locale);

        viewRoot.setLocale(locale);
        viewRoot.setRenderKitId("renderkitid");
View Full Code Here

        expect(_application.getViewHandler()).andReturn(viewHandler);
        expect(_facesContext.getViewRoot()).andReturn(null);
        UIViewRoot viewRoot = _mocksControl.createMock(UIViewRoot.class);
        expect(_application.createComponent(eq(UIViewRoot.COMPONENT_TYPE))).andReturn(viewRoot);

        expect(viewHandler.calculateRenderKitId(same(_facesContext))).andReturn("renderkitid");
        Locale locale = new Locale("xxx");
        expect(viewHandler.calculateLocale(same(_facesContext))).andReturn(locale);

        viewRoot.setLocale(locale);
        viewRoot.setRenderKitId("renderkitid");
View Full Code Here

    }

    public boolean isPostback(FacesContext facesContext)
    {
        ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
        String renderkitId = viewHandler.calculateRenderKitId(facesContext);
        ResponseStateManager rsm
                = getRenderKitFactory().getRenderKit(facesContext, renderkitId).getResponseStateManager();
        return rsm.isPostback(facesContext);
    }
   
View Full Code Here

                // If not, this method must call calculateLocale() and calculateRenderKitId(), and store the results
                // as the values of the locale and renderKitId, proeprties, respectively, of the newly created
                // UIViewRoot.
                ViewHandler handler = application.getViewHandler();
                newViewRoot.setLocale(handler.calculateLocale(context));
                newViewRoot.setRenderKitId(handler.calculateRenderKitId(context));
            }
            else
            {
                // If there is an existing UIViewRoot available on the FacesContext, this method must copy its locale
                // and renderKitId to this new view root
View Full Code Here

        Application application = context.getApplication();
       
        ViewHandler applicationViewHandler = application.getViewHandler();
       
        String renderKitId = applicationViewHandler.calculateRenderKitId(context);

        UIViewRoot viewRoot = application.getStateManager().restoreView(context, viewId, renderKitId);

        return viewRoot;
    }
View Full Code Here

        // note we cannot do this in DefaultFaceletsStateManagementStrategy because it is only used
        // when PSS is enabled, but stateless views can be used without PSS. If the view is stateless,
        // there is no need to ask to the StateManager.
        Application application = context.getApplication();
        ViewHandler applicationViewHandler = application.getViewHandler();
        String renderKitId = applicationViewHandler.calculateRenderKitId(context);

        ResponseStateManager manager = getRenderKitFactory().getRenderKit(
            context, renderKitId).getResponseStateManager();
       
        if (manager.isStateless(context, viewId))
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.