Package javax.faces.application

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


    * @param originalViewId a página que será redirecionada.
    */
   public static final void redirectPage(String originalViewId) {
     FacesContext context = FacesContext.getCurrentInstance();
    ViewHandler viewHandler = context.getApplication().getViewHandler();
    UIViewRoot viewRoot = viewHandler.createView(context, originalViewId);
    context.setViewRoot(viewRoot);
   }
  
}
View Full Code Here


                      .getInstance(context.getExternalContext());
                faceletFactory = associate.getFaceletFactory();
                assert (faceletFactory != null);
            }
            ViewHandler vh = context.getApplication().getViewHandler();
            result = vh.createView(context, viewId);

            // Stash away view id before invoking handlers so that
            // StateContext.partialStateSaving() can determine the current
            // view.
            context.getAttributes().put(RIConstants.VIEWID_KEY_NAME, viewId);
View Full Code Here

                context.responseComplete();
               if (logger.isLoggable(Level.FINE)) {
                   logger.log(Level.FINE, "Response complete for {0}", caseStruct.viewId);
               }
            } else {
                UIViewRoot newRoot = viewHandler.createView(context,
                                                            caseStruct.viewId);
                updateRenderTargets(context, caseStruct.viewId);
                context.setViewRoot(newRoot);
                FlowHandler flowHandler = context.getApplication().getFlowHandler();
                if (null != flowHandler) {
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

    Object newValue = vce.getNewValue();
    if ((newValue != null) && !"".equals(newValue))
    {
      FacesContext fContext = FacesContext.getCurrentInstance();
      ViewHandler vh = fContext.getApplication().getViewHandler();
      UIViewRoot root = vh.createView(fContext, newValue.toString());
      fContext.setViewRoot(root);
    }
  }

  public void setRenderInputFile(boolean renderInputFile)
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

    ViewHandler viewHandler = application.getViewHandler();

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

    {
        ApplicationFactory appFactory =
            (ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        Application application = appFactory.getApplication();
        ViewHandler viewHandler = application.getViewHandler();
        UIViewRoot viewRoot = viewHandler.createView(facesContext, view);
        viewRoot.setViewId(view);
        facesContext.setViewRoot(viewRoot);
    }

    protected String selectDefaultView(RenderRequest request, RenderResponse response) throws PortletException
View Full Code Here

        if(outcome == null || outcome.length()==0)
            return;

        ViewHandler viewHandler=context.getApplication().getViewHandler();
    UIViewRoot viewRoot=viewHandler.createView(context,outcome);
    context.setViewRoot(viewRoot);
    context.renderResponse();
  }
}
View Full Code Here

    LOG.info("Original outcome='"+  original + "', adjusted outcome = '"+ outcome +"'");

    if (StringUtils.startsWith(outcome, "/content/")) {
      ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
      UIViewRoot viewRoot = viewHandler.createView(facesContext, outcome);
      facesContext.setViewRoot(viewRoot);
      facesContext.renderResponse();
    } else {
      navigationHandler.handleNavigation(facesContext, fromAction, outcome);
    }
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.