Examples of NavigationHandler


Examples of javax.faces.application.NavigationHandler

        String outcome = component.getOutcome();
        outcome = (outcome == null) ? facesContext.getViewRoot().getViewId()
                : outcome;
        outcome = ((outcome == null) ? STR_EMPTY : outcome.trim());
        // Get the correct URL for the outcome.
        NavigationHandler nh = facesContext.getApplication().getNavigationHandler();
        if (!(nh instanceof ConfigurableNavigationHandler))
        {
            throw new FacesException(
                    "Navigation handler must be an instance of "
                            + "ConfigurableNavigationHandler for using h:link or h:button");
View Full Code Here

Examples of javax.faces.application.NavigationHandler

     * @see ConfigProcessor#process(javax.servlet.ServletContext,com.sun.faces.config.DocumentInfo[])
     */
    public void process(ServletContext sc, DocumentInfo[] documentInfos)
    throws Exception {

        NavigationHandler handler = getApplication().getNavigationHandler();
        for (DocumentInfo documentInfo : documentInfos) {
            if (LOGGER.isLoggable(Level.FINE)) {
                LOGGER.log(Level.FINE,
                        MessageFormat.format(
                                "Processing navigation-rule elements for document: ''{0}''",
View Full Code Here

Examples of javax.faces.application.NavigationHandler

            }
        }
    }

    private void handleOutcome(final FacesContext facesContext, final JbpmJsfContextImpl jbpmJsfContext) {
        final NavigationHandler navigationHandler = facesContext.getApplication().getNavigationHandler();
        if (jbpmJsfContext.isError()) {
            navigationHandler.handleNavigation(facesContext, jbpmJsfContext.getOutcomeActionName(), "error");
        } else {
            final String outcome = jbpmJsfContext.getOutcome();
            if (outcome != null) {
                navigationHandler.handleNavigation(facesContext, jbpmJsfContext.getOutcomeActionName(), outcome);
            }
        }
    }
View Full Code Here

Examples of javax.faces.application.NavigationHandler

      HttpSession session = request.getSession();
      User user =  (User) session.getAttribute("user");
      if(user == null)
      {
        Application application = fc.getApplication();
        NavigationHandler nh = application.getNavigationHandler();
        nh.handleNavigation(fc, "", "error");
      }
    }
   

  }
View Full Code Here

Examples of javax.faces.application.NavigationHandler

  public String LoadURL()
  {
    String id;
    id = ToolBean.getRequestParameter("id");
    FacesContext fc = FacesContext.getCurrentInstance();
    NavigationHandler nh = fc.getApplication().getNavigationHandler();
      ConfigurableNavigationHandler navigationHandler = (ConfigurableNavigationHandler) nh;

          NavigationCase navCase = navigationHandler.getNavigationCase(fc, null,"DataTable.xhtml?id"+id);
   
    return navCase.getToViewId(fc);
View Full Code Here

Examples of javax.faces.application.NavigationHandler

            {
                throw new FacesException("Error calling action method of component with id " + actionEvent.getComponent().getClientId(facesContext), e);
            }
        }

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

Examples of javax.faces.application.NavigationHandler

    }

    public String getSampleURI() {
        FacesContext context = FacesContext.getCurrentInstance();

        NavigationHandler handler = context.getApplication().getNavigationHandler();

        if (handler instanceof ConfigurableNavigationHandler) {
            ConfigurableNavigationHandler navigationHandler = (ConfigurableNavigationHandler) handler;

            demo = getCurrentDemo().getId();
View Full Code Here

Examples of javax.faces.application.NavigationHandler

        assertEquals(TestViewHandlerA.class, viewHandler.getClass());
        assertEquals(TestViewHandlerB.class, ((TestViewHandlerA) viewHandler).getDelegate().getClass());
        assertEquals(JspViewHandlerImpl.class, ((TestViewHandlerB) ((TestViewHandlerA) viewHandler).getDelegate()).getDelegate().getClass());

        // navigation handler
        NavigationHandler navigationHandler = application.getNavigationHandler();

        assertEquals(TestNavigationHandler.class, navigationHandler.getClass());
        assertEquals(NavigationHandlerImpl.class, ((TestNavigationHandler) navigationHandler).getDelegate().getClass());

        // state manager
        StateManager stateManager = application.getStateManager();
View Full Code Here

Examples of javax.faces.application.NavigationHandler

                log.error("Error calling action method of component with id " + actionEvent.getComponent().getClientId(facesContext), e);
                throw e;
            }
        }

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

Examples of javax.faces.application.NavigationHandler

        String outcome = component.getOutcome();
        outcome = (outcome == null) ? facesContext.getViewRoot().getViewId()
                : outcome;
        outcome = ((outcome == null) ? STR_EMPTY : outcome.trim());
        // Get the correct URL for the outcome.
        NavigationHandler nh = facesContext.getApplication().getNavigationHandler();
        if (!(nh instanceof ConfigurableNavigationHandler))
        {
            throw new FacesException(
                    "Navigation handler must be an instance of "
                            + "ConfigurableNavigationHandler for using h:link or h:button");
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.