Sunday, December 26, 2010

How to navigate programmatically using ControlFlow Case.

There are times when we wish to navigate from code instead of using the ‘Action’ property of UI component and at same time we like to use the ControlFlow cases defined in the taskflow. Well if you wish to do that you can use handleNavigation method from NavigationHandler class in javax.faces.application package.

Here is the sample:
            NavigationHandler  nvHndlr = FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
            nvHndlr.handleNavigation(FacesContext.getCurrentInstance(), null, "PROVIDE_CONTROL_FLOW_CASE_NAME");

1 comment:

  1. hi, what is the control flow case name?
    is it same as the from-activity-id?

    ReplyDelete