Package javax.faces.application

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


            //   - there is no view metadata or metadata.createMetadataView() returned null
            if (viewRoot == null)
            {
                // call ViewHandler.createView(), passing the FacesContext instance for the current request and
                // the view identifier
                viewRoot = viewHandler.createView(facesContext, viewId);
            }
           
            // Subscribe the newly created UIViewRoot instance to the AfterAddToParent event, passing the
            // UIViewRoot instance itself as the listener.
            // -= Leonardo Uribe =- This line it is not necessary because it was
View Full Code Here


                     !facesContext.getViewRoot().getViewId().equals(newViewId))
                {
                    partialViewContext.setRenderAll(true);
                }
               
                UIViewRoot viewRoot = viewHandler.createView(facesContext, newViewId);
                facesContext.setViewRoot(viewRoot);
                facesContext.renderResponse();
            }
        }
        else
View Full Code Here

      navigationHandler.handleNavigation(facesContext, null, outcome);

      if (facesContext.getViewRoot() == null) {
        ViewHandler viewHandler = application.getViewHandler();
        String viewId = getFromViewId();
        UIViewRoot view = viewHandler.createView(facesContext, viewId);
        facesContext.setViewRoot(view);
      }

      lifecycle.render(facesContext);
    } finally {
View Full Code Here

        //boolean viewCreated = false;
        UIViewRoot viewRoot = viewHandler.restoreView(facesContext, viewId);
        if (viewRoot == null)
        {
            viewRoot = viewHandler.createView(facesContext, viewId);
            viewRoot.setViewId(viewId);
            facesContext.renderResponse();
            //viewCreated = true;
        }
View Full Code Here

  }

  public static UIViewRoot getGenericEntryViewRoot(FacesContext context)
  {
    ViewHandler viewHandler = context.getApplication().getViewHandler();
    UIViewRoot uvr = viewHandler.createView(context, _GENERIC_ENTRY_VIEW_ID);
    return uvr;
  }

  public static String getGenericEntryURL(
    FacesContext  context,
View Full Code Here

                //   - we don't have a ViewDeclarationLanguage (e.g. when using facelets-1.x)
                //   - there is no view metadata or metadata.createMetadataView() returned null
                //   - viewHandler.deriveViewId() returned null
                if (viewRoot == null)
                {
                    viewRoot = viewHandler.createView(facesContext, newViewId);
                }
               
                facesContext.setViewRoot(viewRoot);
                facesContext.renderResponse();
            }
View Full Code Here

            //   - there is no view metadata or metadata.createMetadataView() returned null
            if (viewRoot == null)
            {
                // call ViewHandler.createView(), passing the FacesContext instance for the current request and
                // the view identifier
                viewRoot = viewHandler.createView(facesContext, viewId);
            }
           
            // Subscribe the newly created UIViewRoot instance to the AfterAddToParent event, passing the
            // UIViewRoot instance itself as the listener.
            // -= Leonardo Uribe =- This line it is not necessary because it was
View Full Code Here

                context.responseComplete();
               if (logger.isLoggable(Level.FINE)) {
                   logger.fine("Response complete for " + caseStruct.viewId);
               }
            } else {
                UIViewRoot newRoot = viewHandler.createView(context,
                                                            caseStruct.viewId);
                updateRenderTargets(context, caseStruct.viewId);
                context.setViewRoot(newRoot);
                if (logger.isLoggable(Level.FINE)) {
                    logger.fine("Set new view in FacesContext for " +
View Full Code Here

                        // 1.1 -> create a new view and flag that the response should
                        //        be immediately rendered
                        if (LOGGER.isLoggable(Level.FINE)) {
                            LOGGER.fine("Postback: recreating a view for " + viewId);
                        }
                        viewRoot = viewHandler.createView(facesContext, viewId);
                        facesContext.renderResponse();

                    } else {
                        Object[] params = {viewId};
                        throw new ViewExpiredException(
View Full Code Here

            else
            {
                ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
                //create new view
                String newViewId = navigationCase.getToViewId();
                UIViewRoot viewRoot = viewHandler.createView(facesContext, newViewId);
                facesContext.setViewRoot(viewRoot);
                facesContext.renderResponse();
            }
        }
        else
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.