Package javax.faces.application

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


            try
            {
                facesContext.setProcessingEvents(false);
                // call ViewHandler.restoreView(), passing the FacesContext instance for the current request and the
                // view identifier, and returning a UIViewRoot for the restored view.
                viewRoot = viewHandler.restoreView(facesContext, viewId);
                if (viewRoot == null)
                {
                    // If the return from ViewHandler.restoreView() is null, throw a ViewExpiredException with an
                    // appropriate error message.
                    throw new ViewExpiredException("No saved view state could be found for the view identifier: "
View Full Code Here


            {
                facesContext.setProcessingEvents(false);
                // call ViewHandler.restoreView(), passing the FacesContext instance for the current request and the
                // view identifier, and returning a UIViewRoot for the restored view.
               
                viewRoot = viewHandler.restoreView(facesContext, viewId);
                if (viewRoot == null)
                {
                    if (facesContext.getResponseComplete())
                    {
                        // If the view handler cannot restore the view and the response
View Full Code Here

        Application application = facesContext.getApplication();
        ViewHandler viewHandler = application.getViewHandler();

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

        boolean isPostBack = isPostback(facesContext);
        if (isPostBack) {
            // try to restore the view
            ViewHandler viewHandler = Util.getViewHandler(facesContext);
            if (null == (viewRoot =
                  viewHandler.restoreView(facesContext, viewId))) {
                JSFVersionTracker tracker =
                      getAssociate(facesContext).getJSFVersionTracker();

                // The tracker will be null if the user turned off the
                // version tracking feature. 
View Full Code Here

            try
            {
                facesContext.setProcessingEvents(false);
                // call ViewHandler.restoreView(), passing the FacesContext instance for the current request and the
                // view identifier, and returning a UIViewRoot for the restored view.
                viewRoot = viewHandler.restoreView(facesContext, viewId);
                if (viewRoot == null)
                {
                    // If the return from ViewHandler.restoreView() is null, throw a ViewExpiredException with an
                    // appropriate error message.
                    throw new ViewExpiredException("No saved view state could be found for the view identifier: "
View Full Code Here

    final Application application = facesContext.getApplication();
    final ViewHandler viewHandler = application.getViewHandler();

    final boolean postBack = isPostBack(facesContext);
    if (postBack) {
      viewRoot = viewHandler.restoreView(facesContext, viewId);
    }
    if (viewRoot == null) {
      viewRoot = viewHandler.createView(facesContext, viewId);
      viewRoot.setViewId(viewId);
      facesContext.renderResponse();
View Full Code Here

        if (restoreViewSupport.isPostback(facesContext))
        {
            if (log.isTraceEnabled())
                log.trace("Request is a postback");

            viewRoot = viewHandler.restoreView(facesContext, viewId);
            if (viewRoot == null)
            {
                throw new ViewExpiredException("The expected view was not returned " + "for the view identifier: "
                        + viewId, viewId);
            }
View Full Code Here

        boolean isPostBack = (facesContext.isPostback() && !isErrorPage(facesContext));
        if (isPostBack) {
            facesContext.setProcessingEvents(false);
            // try to restore the view
            viewRoot = viewHandler.restoreView(facesContext, viewId);
            if (viewRoot == null) {
                if (is11CompatEnabled(facesContext)) {
                    // 1.1 -> create a new view and flag that the response should
                    //        be immediately rendered
                    if (LOGGER.isLoggable(Level.FINE)) {
View Full Code Here

         // Restore or Create new view.
         String viewId = calculateViewId(context);
         ViewHandler viewHandler = context.getApplication().getViewHandler();
         if (isFacesRequest(context)) {
            // TODO - check for a null and throw exception.
            viewRoot = viewHandler.restoreView(context, viewId);
            if (null != viewRoot) {
               processBindings(context, viewRoot);
            } else {
               // Error restore view. Session Expired ?
               throw new ViewExpiredException("Error restore view " + viewId + ", session expired?");
View Full Code Here

         // Restore or Create new view.
         String viewId = calculateViewId(context);
         ViewHandler viewHandler = context.getApplication().getViewHandler();
         if (isFacesRequest(context)) {
            // TODO - check for a null and throw exception.
            viewRoot = viewHandler.restoreView(context, viewId);
            if (null != viewRoot) {
               processBindings(context, viewRoot);
            } else {
               // Error restore view. Session Expired ?
               throw new ViewExpiredException("Error restore view " + viewId + ", session expired?");
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.