UIComponent source = event.getComponent();
ActionSource actionSource = (ActionSource) source;
Application application = facesContext.getApplication();
MethodBinding binding = actionSource.getAction();
// Retrieve the NavigationHandler instance..
NavigationHandler navHandler = application.getNavigationHandler();
// Invoke nav handling..
String navBinding = (null != binding) ? binding.getExpressionString() : null;
navHandler.handleNavigation(facesContext, navBinding, errorOutcome);
// Trigger a switch to Render Response if needed
facesContext.renderResponse();
}
}