Programmatically triggering navigation in ADF Mobile

In your ADF mobile application, sometimes you may want to programmatically trigger navigation from some listener code that you may have in your manged bean. You can use the following piece of code for such use cases.

//Some action listener for a button
public void goToNextViewProgrammatically(ActionEvent actionEvent){
//The client side business logic go here...

//Now you can trigger navigation 
        AdfmfContainerUtilities.invokeContainerJavaScriptFunction(
AdfmfJavaUtilities.getFeatureName(),
"adf.mf.api.amx.doNavigation", 
 new Object[] { "gotoView2" }); 
//In the above case 'gotoView'2 is the from-outcome 
//defined in the underlying
//task flow which causes navigation to next view

}

Comments