Search in sources :

Example 6 with PhaseListener

use of javax.faces.event.PhaseListener in project deltaspike by apache.

the class JsfRequestLifecycleBroadcaster method broadcastBeforeEvent.

protected void broadcastBeforeEvent(PhaseEvent phaseEvent) {
    // TODO discuss exception handling
    // fire to phase-observer methods
    this.phaseEvent.select(createAnnotationLiteral(phaseEvent.getPhaseId(), true)).fire(phaseEvent);
    this.beforeAnyPhaseEvent.fire(phaseEvent);
    // fire to ds-phase-listeners
    for (PhaseListener phaseListener : this.phaseListeners) {
        PhaseId targetPhase = phaseListener.getPhaseId();
        if (targetPhase == PhaseId.ANY_PHASE || targetPhase == phaseEvent.getPhaseId()) {
            phaseListener.beforePhase(phaseEvent);
        }
    }
}
Also used : JsfPhaseId(org.apache.deltaspike.jsf.api.listener.phase.JsfPhaseId) PhaseId(javax.faces.event.PhaseId) JsfPhaseListener(org.apache.deltaspike.jsf.api.listener.phase.JsfPhaseListener) PhaseListener(javax.faces.event.PhaseListener)

Aggregations

PhaseListener (javax.faces.event.PhaseListener)6 IPCPhaseListener (com.liferay.faces.bridge.event.internal.IPCPhaseListener)2 FacesContext (javax.faces.context.FacesContext)2 PhaseEvent (javax.faces.event.PhaseEvent)2 PhaseId (javax.faces.event.PhaseId)2 JsfPhaseId (org.apache.deltaspike.jsf.api.listener.phase.JsfPhaseId)2 JsfPhaseListener (org.apache.deltaspike.jsf.api.listener.phase.JsfPhaseListener)2 BridgeNavigationHandler (com.liferay.faces.bridge.application.internal.BridgeNavigationHandler)1 CapturingWriter (com.liferay.faces.bridge.context.internal.CapturingWriter)1 WriterOperation (com.liferay.faces.bridge.context.internal.WriterOperation)1 ClassMethodSignature (com.newrelic.agent.tracers.ClassMethodSignature)1 Tracer (com.newrelic.agent.tracers.Tracer)1 Trace (com.newrelic.api.agent.Trace)1 Phase (com.sun.faces.lifecycle.Phase)1 MockFacesContext (com.sun.faces.mock.MockFacesContext)1 MockLifecycle (com.sun.faces.mock.MockLifecycle)1 Writer (java.io.Writer)1 ArrayList (java.util.ArrayList)1 ListIterator (java.util.ListIterator)1 FacesException (javax.faces.FacesException)1