private void afterPhase(FacesContext context, PhaseId phase) { for (int i = _phaseListeners.length - 1; i >= 0; i--) { PhaseListener listener = _phaseListeners[i]; PhaseId id = listener.getPhaseId(); if (phase == id || id == PhaseId.ANY_PHASE) { PhaseEvent event = new PhaseEvent(context, phase, this); listener.afterPhase(event); } } }
private void beforePhase(FacesContext context, PhaseId phase) { for (int i = 0; i < _phaseListeners.length; i++) { PhaseListener listener = _phaseListeners[i]; PhaseId id = listener.getPhaseId(); if (id == phase || id == PhaseId.ANY_PHASE) { PhaseEvent event = new PhaseEvent(context, phase, this); listener.beforePhase(event); } } }