protected void handleBeforePhase(FacesContext context,
ListIterator<PhaseListener> listenersIterator,
PhaseEvent event) {
Flash flash = context.getExternalContext().getFlash();
flash.doPrePhaseActions(context);
RequestStateManager.clearAttributesForPhase(context,
context.getCurrentPhaseId());
while (listenersIterator.hasNext()) {
PhaseListener listener = listenersIterator.next();
if (this.getId().equals(listener.getPhaseId()) ||