Package javax.faces.application

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


      }
      if (LOG.isDebugEnabled()) {
        LOG.debug("outcome = '" + outcome + "'");
      }
      NavigationHandler navigationHandler = application.getNavigationHandler();
      navigationHandler.handleNavigation(facesContext, null, outcome);
      lifecycle.render(facesContext);
    } finally {
      facesContext.release();
    }
  }
View Full Code Here


        String toFlowDocumentId = (component != null) ?
            (String) component.getAttributes().get(ActionListener.TO_FLOW_DOCUMENT_ID_ATTR_NAME) : null;
       
        if (toFlowDocumentId != null)
        {
            navigationHandler.handleNavigation(facesContext, fromAction, outcome, toFlowDocumentId);
        }
        else
        {
            navigationHandler.handleNavigation(facesContext, fromAction, outcome);
        }
View Full Code Here

        {
            navigationHandler.handleNavigation(facesContext, fromAction, outcome, toFlowDocumentId);
        }
        else
        {
            navigationHandler.handleNavigation(facesContext, fromAction, outcome);
        }
        //Render Response if needed
        facesContext.renderResponse();

    }
View Full Code Here

                {
                    String outcome = result.toString();
                    // Retrieve the NavigationHandler instance..
                    NavigationHandler navHandler = context.getApplication().getNavigationHandler();
                    // Invoke nav handling..
                    navHandler.handleNavigation(context, action, outcome);
                    // Trigger a switch to Render Response if needed
                    context.renderResponse();
                    return;
                }
                restoreSessionMessage();
View Full Code Here

        // Return to Parent
        FacesContext context = FacesContext.getCurrentInstance();
        // Retrieve the NavigationHandler instance..
        NavigationHandler navHandler = context.getApplication().getNavigationHandler();
        // Invoke nav handling..
        navHandler.handleNavigation(context, action, outcome.toString());
        // Trigger a switch to Render Response if needed
        context.renderResponse();
    }

    /**
 
View Full Code Here

    }
    else if (decoratedNavigationHandler != null) {
      // Standard NavigationHandler specified through constructor argument:
      // Call it through standard API, without original NavigationHandler passed in.
      // The called handler will not be able to redirect to the original handler.
      decoratedNavigationHandler.handleNavigation(facesContext, fromAction, outcome);
    }
    else if (originalNavigationHandler != null) {
      // No NavigationHandler specified through constructor argument:
      // Call original handler, marking the end of this chain.
      originalNavigationHandler.handleNavigation(facesContext, fromAction, outcome);
View Full Code Here

    if (handler instanceof DecoratingNavigationHandler) {
      ((DecoratingNavigationHandler) handler).handleNavigation(
          facesContext, fromAction, outcome, this.originalNavigationHandler);
    }
    else {
      handler.handleNavigation(facesContext, fromAction, outcome);
    }
  }

  /**
   * Return the target NavigationHandler to delegate to.
View Full Code Here

        UIViewRoot viewRoot = new UIViewRoot();

        // case 1: no from-view-id
        viewRoot.setViewId("/anypage.jsp");
        _facesContext.setViewRoot(viewRoot);
        navigationHandler.handleNavigation(_facesContext, "#{anyaction}", "outcome1");
        assertEquals(_facesContext.getViewRoot().getViewId(), "/page1.jsp");

        // case 2: from-view-id = *, with from-outcome, no from-action
        viewRoot.setViewId("/anypage.jsp");
        _facesContext.setViewRoot(viewRoot);
View Full Code Here

        assertEquals(_facesContext.getViewRoot().getViewId(), "/page1.jsp");

        // case 2: from-view-id = *, with from-outcome, no from-action
        viewRoot.setViewId("/anypage.jsp");
        _facesContext.setViewRoot(viewRoot);
        navigationHandler.handleNavigation(_facesContext, "#{anyaction}", "outcome2");
        assertEquals(_facesContext.getViewRoot().getViewId(), "/page2.jsp");

        // case 3: from-view-id = *, with from-outcome and from-action
        viewRoot.setViewId("/anypage.jsp");
        _facesContext.setViewRoot(viewRoot);
View Full Code Here

        assertEquals(_facesContext.getViewRoot().getViewId(), "/page2.jsp");

        // case 3: from-view-id = *, with from-outcome and from-action
        viewRoot.setViewId("/anypage.jsp");
        _facesContext.setViewRoot(viewRoot);
        navigationHandler.handleNavigation(_facesContext, "#{action3}", "outcome3");
        assertEquals(_facesContext.getViewRoot().getViewId(), "/page3.jsp");

        // case 4: from-view-id = *, no from-outcome, with from-action
        viewRoot.setViewId("/anypage.jsp");
        _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.