Class<? extends ViewConfig> errorPage,
boolean allowNavigation)
{
FacesContext facesContext = FacesContext.getCurrentInstance();
SecurityViolationHandler securityViolationHandler =
CodiUtils.getContextualReferenceByClass(SecurityViolationHandler.class, true);
if(securityViolationHandler != null)
{
//optional (custom handler) - allows to handle custom implementations of SecurityViolation
securityViolationHandler.processSecurityViolations(exception.getViolations());
}
else
{
addViolationsAsMessage(exception.getViolations());
}