Examples of ViewExpiredException


Examples of javax.faces.application.ViewExpiredException

            ExceptionQueuedEvent event = i.next();
            ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();

            Throwable t = context.getException();
            if (t instanceof ViewExpiredException) {
                ViewExpiredException vee = (ViewExpiredException) t;
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> requestMap = facesContext.getExternalContext().getRequestMap();
                NavigationHandler navigationHandler = facesContext.getApplication().getNavigationHandler();
                try {
                    // Push some useful stuff to the request scope for use in the page
                    requestMap.put("currentViewId", vee.getViewId());
                    navigationHandler.handleNavigation(facesContext, null, "/viewExpired");
                    facesContext.renderResponse();
                } finally {
                    i.remove();
                }
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

            ExceptionQueuedEvent event = i.next();
            ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();

            Throwable t = context.getException();
            if (t instanceof ViewExpiredException) {
                ViewExpiredException vee = (ViewExpiredException) t;
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> requestMap = facesContext.getExternalContext().getRequestMap();
                NavigationHandler navigationHandler = facesContext.getApplication().getNavigationHandler();
                try {
                    // Push some useful stuff to the request scope for use in the page
                    requestMap.put("currentViewId", vee.getViewId());
                    navigationHandler.handleNavigation(facesContext, null, "/viewExpired");
                    facesContext.renderResponse();
                } finally {
                    i.remove();
                }
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

            ExceptionQueuedEvent event = i.next();
            ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();

            Throwable t = context.getException();
            if (t instanceof ViewExpiredException) {
                ViewExpiredException vee = (ViewExpiredException) t;
                FacesContext facesContext = FacesContext.getCurrentInstance();
                Map<String, Object> requestMap = facesContext.getExternalContext().getRequestMap();
                NavigationHandler navigationHandler = facesContext.getApplication().getNavigationHandler();
                try {
                    // Push some useful stuff to the request scope for use in the page
                    requestMap.put("currentViewId", vee.getViewId());
                    navigationHandler.handleNavigation(facesContext, null, "/viewExpired");
                    facesContext.renderResponse();
                } finally {
                    i.remove();
                }
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

                    //break;
                }
            }
            if (!isMacEqual)
            {
                throw new ViewExpiredException();
            }
           
            return cipher.doFinal(secure, 0, secure.length-macLenght);
        }
        catch (Exception e)
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

    viewHandler.initView(facesContext);
  }

  public static void throwViewExpiredException(String viewId)
  {
    throw new ViewExpiredException(
        "The expected view was not returned for the view identifier: " + viewId, viewId);
  }
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

                log.trace("Request is a postback");

            viewRoot = viewHandler.restoreView(facesContext, viewId);
            if (viewRoot == null)
            {
                throw new ViewExpiredException(
                    "No saved view state could be found for the view identifier: "
                        + viewId, viewId);
            }
            restoreViewSupport.processComponentBinding(facesContext, viewRoot);
        }
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

                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: "
                                                   + viewId, viewId);
                }
               
                // Store the restored UIViewRoot in the FacesContext.
                facesContext.setViewRoot(viewRoot);
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

                    }
                    else
                    {
                        // 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: "
                                                   + viewId, viewId);
                    }
                }
                // If the view is transient (stateless), it is necessary to check the view protection
                // in POST case.
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

                    }
                }

                if (null == viewRoot) {
                    Object[] params = {viewId};
                    throw new ViewExpiredException(MessageUtils.getExceptionMessageString(
                          MessageUtils.RESTORE_VIEW_ERROR_MESSAGE_ID, params),
                                                   viewId);
                }
            }
            facesContext.setViewRoot(viewRoot);
View Full Code Here

Examples of javax.faces.application.ViewExpiredException

                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: "
                                                   + viewId, viewId);
                }
               
                // Store the restored UIViewRoot in the FacesContext.
                facesContext.setViewRoot(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.