org.apache.shale.dialog.faces
Class DialogPhaseListener

java.lang.Object
  extended by org.apache.shale.dialog.faces.DialogPhaseListener
All Implemented Interfaces:
Serializable, EventListener, javax.faces.event.PhaseListener

public final class DialogPhaseListener
extends Object
implements javax.faces.event.PhaseListener

Phase listener that saves and restores the dialog identifier for the currently active dialog, if any. Based on the presence of certain request parameters, it can also cause a new DialogContext instance to be created and started, optionally associated with a parent DialogContext instance also belonging to the same user.

Since:
1.0.4
See Also:
Serialized Form

Constructor Summary
DialogPhaseListener()
          Creates a new instance of DialogPhaseListener.
 
Method Summary
 void afterPhase(javax.faces.event.PhaseEvent event)
          After the Restore View phase, retrieve the current dialog identifier (if any), and restore the corresponding DialogContext.
 void beforePhase(javax.faces.event.PhaseEvent event)
          Before the Render Response phase, acquire the current dialog identifier (if any), and store it in the view.
 javax.faces.event.PhaseId getPhaseId()
          Return the phase identifier we are interested in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogPhaseListener

public DialogPhaseListener()

Creates a new instance of DialogPhaseListener.

Method Detail

getPhaseId

public javax.faces.event.PhaseId getPhaseId()

Return the phase identifier we are interested in.

Specified by:
getPhaseId in interface javax.faces.event.PhaseListener
Returns:
The phase identifier of interest

afterPhase

public void afterPhase(javax.faces.event.PhaseEvent event)

After the Restore View phase, retrieve the current dialog identifier (if any), and restore the corresponding DialogContext. If this view is not currently executing a DialogContext instance, optionally create a new instance based o the presence of request parameters.

Specified by:
afterPhase in interface javax.faces.event.PhaseListener
Parameters:
event - The phase event to be processed

beforePhase

public void beforePhase(javax.faces.event.PhaseEvent event)

Before the Render Response phase, acquire the current dialog identifier (if any), and store it in the view.

Specified by:
beforePhase in interface javax.faces.event.PhaseListener
Parameters:
event - The phase event to be processed


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.