Friday, May 4, 2012

ADF: Programmatic Navigation


Below is the API that can be used to programmatically navigate to next/new activity of taskflow:
FacesContext facesContext = FacesContext.getCurrentInstance();
NavigationHandler navHandler = facesContext.getApplication().getNavigationHandler();
navHandler.handleNavigation(facesContext, null, "controlFlowCaseName");
API javadoc:
Package: javax.faces.application.NavigationHandler

public abstract void handleNavigation(FacesContext context, String fromAction, String outcome)

Perform navigation processing based on the state information in the specified FacesContext,
plus the outcome string returned by an executed application action.

Parameters:
context - The FacesContext for the current request
fromAction - The action binding expression that was evaluated to retrieve the specified outcome,
or null if the outcome was acquired by some other means
outcome - The logical outcome returned by a previous invoked application action (which may be null)
Throws: NullPointerException - if context is null

No comments:

Post a Comment