Can you confirm that you don’t have a navigation-rule defined in your faces-config.xml file that would do that navigation?
If there is no navigation-rule involved, then can you confirm that your action handler method returns null to signal that you want to stay on the same view?
JSF version 2.x introduced an “implicit navigation” concept that reduces the typical navigation-related code in the faces-config.xml file. Essentially, if no matching navigation case is found after checking all available navigation rules that were declared in the faces-config.xml file, the navigation handler checks to see whether the action outcome corresponds to a view id. If a view matching the action outcome is found, an implicit navigation to the matching view occurs.
So the end result is that your action handler can navigate directly to another page without you having to mess with any navigation-rule elements in the faces-config.xml file.
For example, these two action handler methods demonstrate how an action handler can affect the implicit navigation:
public String doActionThatStaysOnSamePage() {
//TODO: do your action logic here
//return null to stay on the same page
return null;
}
public String doActionThatSwitchesToPage2() {
//TODO: do your action logic here
//return the viewId of the page to switch to
return "/yourportlet/page2.view";
}
CAF upgraded to JavaServer Faces (JSF) version 2.2 a while back. With JSF version 2.x or later, if you haven’t defined an explicit in faces-config.xml for the outcome string, then the outcome string returned from an action handler method is expected to be null or the viewId of the page to switch to. You would want to return null if you want to stay on the same page, or the target viewId if you want the action to switch to a different view. Please see section 7.4.2 of the JSF 2.x specification if you want more details about the default navigation handler algorithm.
#webMethods#MWS-CAF-Task-Engine#webMethods-BPMS