public static void navToOutCome(String outCome) {
FacesContext facesContext = FacesContext.getCurrentInstance();
Application application = facesContext.getApplication();
NavigationHandler navigationHandler =
application.getNavigationHandler();
ControllerContext controllerContext = ControllerContext.getInstance();
String viewId = controllerContext.getCurrentViewPort().getViewId();
if (viewId != null) {
navigationHandler.handleNavigation(facesContext, viewId, outCome);
}
}
navToOutCome("action");