Package javax.faces.application

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


        {
            UIViewRoot root = (UIViewRoot) context.getAttributes().remove(DUMMY_VIEW_CREATE_HOOK);
            Application application = context.getApplication();
            ViewHandler handler = application.getViewHandler();
            root.setLocale(handler.calculateLocale(context));
            root.setRenderKitId(handler.calculateRenderKitId(context));
            root.setViewId(viewId);
            return root;
        }
        else
        {
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
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

      RenderKit renderKit = facesContext.getRenderKit();
      if (renderKit == null) {
        RenderKitFactory renderFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
        Application application = facesContext.getApplication();
        ViewHandler applicationViewHandler = application.getViewHandler();
        String renderKitId = applicationViewHandler.calculateRenderKitId(facesContext);
        renderKit = renderFactory.getRenderKit(facesContext, renderKitId);
      }
      writer = renderKit.createResponseWriter(((HttpServletResponse)
              facesContext.getExternalContext().getResponse()).getWriter(), null, null);
    }
View Full Code Here

      RenderKit renderKit = facesContext.getRenderKit();
      if (renderKit == null) {
        RenderKitFactory renderFactory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
        Application application = facesContext.getApplication();
        ViewHandler applicationViewHandler = application.getViewHandler();
        String renderKitId = applicationViewHandler.calculateRenderKitId(facesContext);
        renderKit = renderFactory.getRenderKit(facesContext, renderKitId);
      }
      writer = renderKit.createResponseWriter(((HttpServletResponse)
              facesContext.getExternalContext().getResponse()).getWriter(), null, null);
    }
View Full Code Here

            //set old renderKit
            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

     * Just invoke StateManager.restoreView.
     */
    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

        UIViewRoot root = null;

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

        root = context.getApplication().getStateManager().restoreView(context,viewId,renderKitId);
        return root;
    }
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

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.