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);
}
}
}
Aggregations