When you want to rollback any transaction before navigate to another page:
1- Create class that extends class called NavigationHandler then
override method called handleNavigation as follows:
2- Register the class at the faces-config.xml file as follows:
1- Create class that extends class called NavigationHandler then
override method called handleNavigation as follows:
public class CustomNavigationHandler extends NavigationHandler{
private NavigationHandler navHandler=null;
public CustomNavigationHandler(NavigationHandler navHandler)
{
super();
this.navHandler=navHandler;
}
public void handleNavigation(FacesContext ctx,String action,String outcome){
if (outcome !=null){
ADFUtils.getAppImpl("AppModuleAM").getDBTransaction().rollback();
}
navHandler.handleNavigation(ctx,action,outcome);
}
}
2- Register the class at the faces-config.xml file as follows:
No comments:
Post a Comment