class: FacesMessagesPhaseListener

public class: FacesMessagesPhaseListener
Author: Markus Haarlaender (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: $Revision: 1891 $ $LastChangedDate: 2008-12-23 11:; Complexity: 1
Dates: Created: 16.07.2009 15:31:54; Modified: 16.07.2009 15:31:54;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {9F26750C-BDC4-45a1-9F03-6E1E07CB4B3D}
With this listener, it can be avoided that Faces Messages are lost when doing an redirect instead of applying a navigation rule
 

Goto: Custom Properties, Fields, Methods

Appears in: appbase

Custom Properties
 
FacesMessagesPhaseListener Attributes
Attribute Details
private Logger
  logger
Initial: Logger.getLogger(FacesMessagesPhaseListener.class)
private static const String
  sessionToken
Initial: "REDIRECT_MESSAGES_SUPPORT"
 
FacesMessagesPhaseListener Methods
Operation Details
public
afterPhase(
   PhaseEvent event):void
Sequential
Notes: Caches Faces Messages after the Invoke Application phase and clears the cache after the Render Response phase
public
beforePhase(
   PhaseEvent event):void
Sequential
Notes: Restores the messages from the cache before the Restore View phase.
private
cacheMessages(
   FacesContext context):int
Sequential
Notes: Caches messages from current faces context to a session object
@return
private
getMessageCache(
   FacesContext context):Map>
Sequential
public
getPhaseId():PhaseId
Sequential
private
removeFromCache(
   FacesContext context):void
Sequential
Notes: Clears the whole cache
private
restoreMessages(
   FacesContext context):void
Sequential
Notes: Restores messages from session to faces context