@Override public void performNavigation(final String outcome) { parent.performNavigation(outcome); } }
@Override public void performNavigation(final String outcome) { parent.performNavigation(outcome); } }
@Override public void performNavigation(final String outcome) { parent.performNavigation(outcome); } }
@Override public void performNavigation(final String outcome) { parent.performNavigation(outcome); } }
import javax.faces.application.ConfigurableNavigationHandler; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import javax.faces.event.ComponentSystemEvent; @ManagedBean(name="listener") @SessionScoped public class ListenerBean{ public void handleEvent(ComponentSystemEvent event){ // Handle event, do your thing, and redirect again if you need FacesContext fc = FacesContext.getCurrentInstance(); ConfigurableNavigationHandler nav = (ConfigurableNavigationHandler) fc.getApplication().getNavigationHandler(); nav.performNavigation("my-navigation-rule"); } }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Override public void performNavigation(String outcome) { getWrapped().performNavigation(outcome); }
@Named @ApplicationScoped class PermissionManager { ... public void checkRoles(ComponentSystemEvent event) { String acl = "" + event.getComponent().getAttributes().get("roles"); //Check user role ... //Redirect if required try { ConfigurableNavigationHandler handler = (ConfigurableNavigationHandler) context .getApplication().getNavigationHandler(); handler.performNavigation("access-denied"); } catch (Exception e) { ... } } }