Beispiel #1
0
  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);
      }
    }
  }
Beispiel #2
0
  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);
      }
    }
  }