Package javax.faces.application

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


        else
        {
            if (log.isTraceEnabled())
                log.trace("Request is not a postback. New UIViewRoot will be created");

            viewRoot = viewHandler.createView(facesContext, viewId);
            facesContext.renderResponse();
        }

        facesContext.setViewRoot(viewRoot);
View Full Code Here


        ApplicationFactory appFactory =
            (ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        Application application = appFactory.getApplication();
        ViewHandler viewHandler = application.getViewHandler();
        FacesContext facesContext = facesContext(request, response);
        UIViewRoot viewRoot = viewHandler.createView(facesContext, view);
        viewRoot.setViewId(view);
        facesContext.setViewRoot(viewRoot);
        lifecycle.render(facesContext);
    }
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

                //   - 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);
            }
           
            if (viewRoot == null && facesContext.getResponseComplete())
            {
                // If the view handler cannot create the view and the response
View Full Code Here

            }
        }
        else
        {
            ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
            UIViewRoot viewRoot = viewHandler.createView(facesContext, targetViewId);
            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

        ApplicationFactory appFactory =
            (ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        Application application = appFactory.getApplication();
        ViewHandler viewHandler = application.getViewHandler();
        FacesContext facesContext = facesContext(request, response);
        UIViewRoot viewRoot = viewHandler.createView(facesContext, view);
        viewRoot.setViewId(view);
        facesContext.setViewRoot(viewRoot);
        lifecycle.render(facesContext);
    }
View Full Code Here

            view.setRestored(true);
          } else {
            if (logger.isDebugEnabled()) {
              logger.debug("Creating UIViewRoot from '" + viewName + "'");
            }
            viewRoot = viewHandler.createView(facesContext, viewName);
            facesContext.setViewRoot(viewRoot);
            view = createJsfView(viewRoot, lifecycle, context);
            view.setRestored(false);
          }
        } else {
View Full Code Here

          }
        } else {
          if (logger.isDebugEnabled()) {
            logger.debug("Creating transient UIViewRoot from '" + viewName + "'");
          }
          UIViewRoot viewRoot = viewHandler.createView(facesContext, viewName);
          viewRoot.setTransient(true);
          facesContext.setViewRoot(viewRoot);
          view = createJsfView(viewRoot, lifecycle, context);
          view.setRestored(false);
        }
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.