Package javax.faces.application

Examples of javax.faces.application.NavigationHandler.handleNavigation()


                // change exception for different jpa provider as this is what
                // hibernate throws in case of optimistic lock failure.
                if (unwindException(t) instanceof StaleObjectStateException) {
                    FacesUtils.error("error.optimisticLocking");
                    nav.handleNavigation(fc, null, null);
                    fc.renderResponse();

                } else if (t instanceof ViewExpiredException) {

                    FacesUtils.error("error.sessionExpired");
View Full Code Here


                    fc.renderResponse();

                } else if (t instanceof ViewExpiredException) {

                    FacesUtils.error("error.sessionExpired");
                    nav.handleNavigation(fc, null, "/login.xhtml");
                    fc.renderResponse();

                }

            } finally {
View Full Code Here

      // Retrieve the NavigationHandler instance..
      NavigationHandler navHandler = application.getNavigationHandler();
      // Invoke nav handling..
      String navBinding =
          (null != binding) ? binding.getExpressionString() : null;
      navHandler.handleNavigation(facesContext, navBinding,
          errorOutcome);
      // Trigger a switch to Render Response if needed
      facesContext.renderResponse();
    }
  }
View Full Code Here

        NavigationHandler navHandler = application.getNavigationHandler();

        // Invoke nav handling..

        navHandler.handleNavigation(context,
                                    (null != binding) ?
                                    binding.getExpressionString() : null,
                                    outcome);

        // Trigger a switch to Render Response if needed
View Full Code Here

            }

        }
       
        NavigationHandler navigationHandler = application.getNavigationHandler();
        navigationHandler.handleNavigation(facesContext, fromAction, outcome);
        //Render Response if needed
        facesContext.renderResponse();

    }
}
View Full Code Here

      if (facesContext.getViewRoot() == null) {
        facesContext.setViewRoot(createViewRoot(facesContext));
      }

      final NavigationHandler navigationHandler = application.getNavigationHandler();
      navigationHandler.handleNavigation(facesContext, null, outcome);


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

      final MethodExpression expression = actionSource.getActionExpression();
      // Retrieve the NavigationHandler instance..
      final NavigationHandler navHandler = application.getNavigationHandler();
      // Invoke nav handling..
      final String navBinding = (null != expression) ? expression.getExpressionString() : null;
      navHandler.handleNavigation(facesContext, navBinding, errorOutcome);
      // Trigger a switch to Render Response if needed
      facesContext.renderResponse();
    }
  }
View Full Code Here

      if (cause instanceof ErrorTestException) {
        final FacesContext facesContext = FacesContext.getCurrentInstance();
        final NavigationHandler nav = facesContext.getApplication().getNavigationHandler();
        try {
          facesContext.addMessage(null, new FacesMessage("The expected exception was thrown!"));
          nav.handleNavigation(facesContext, null, "/test/error/display-exception.xhtml");
          facesContext.renderResponse();
        } finally {
          iterator.remove();
        }
      }
View Full Code Here

            if (outcome != null && !"".endsWith(outcome.trim())) {
                try {
                    FacesContext context = FacesContext.getCurrentInstance();
                    NavigationHandler navHandler = context.getApplication().getNavigationHandler();
                    navHandler.handleNavigation(context, null, outcome);
                } catch (Exception ex) {
                    ex.printStackTrace();
                    Logger.getLogger(SecurityPageController.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
View Full Code Here

                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

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.