config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/event/MultiPageMessagesSupport.java
public void afterPhase(final PhaseEvent event)
   {
      if (!PhaseId.RENDER_RESPONSE.equals(event.getPhaseId()))
      {
         FacesContext facesContext = event.getFacesContext();
         messagesUtils.saveMessages(facesContext, facesContext.getExternalContext().getSessionMap());
      }
   }
public void afterPhase(final PhaseEvent event)
   {
      if (!PhaseId.RENDER_RESPONSE.equals(event.getPhaseId()))
      {
         FacesContext facesContext = event.getFacesContext();
         messagesUtils.saveMessages(facesContext, facesContext.getExternalContext().getSessionMap());
      }
   }
/*
Save messages into the session after every phase.