Examples of calculateRenderKitId()


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

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

                // 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

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

        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

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

    }

    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

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

            uiViewRoot.setRenderKitId(currentRenderKitId);
        }
        else
        {
            //calculate renderKit
            uiViewRoot.setRenderKitId(applicationViewHandler.calculateRenderKitId(facesContext));
        }

        if (log.isTraceEnabled()) log.trace("Created view " + viewId);
        return uiViewRoot;
    }
View Full Code Here

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

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

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

        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

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

        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

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

    }

    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

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

            uiViewRoot.setRenderKitId(currentRenderKitId);
        }
        else
        {
            // calculate renderKit
            uiViewRoot.setRenderKitId(applicationViewHandler.calculateRenderKitId(facesContext));
        }

        if (log.isLoggable(Level.FINEST))
            log.finest("Created view " + viewId);
        return uiViewRoot;
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.