Package com.sun.faces.context
Class StateContext.StatelessAddRemoveListener
java.lang.Object
com.sun.faces.context.StateContext.NoopAddRemoveListener
com.sun.faces.context.StateContext.StatelessAddRemoveListener
- All Implemented Interfaces:
FacesListener,SystemEventListener,EventListener
- Enclosing class:
StateContext
An AddRemoveListener that implements the new dynamic component strategy where no state is managed by the listener
itself. Instead, we use expando attributes on the dynamic components (and their parents) to track/preserve the
dynamic nature of these components.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidhandleAdd(FacesContext context, UIComponent component) Handle the add.protected voidhandleRemove(FacesContext context, UIComponent component) Handle the remove.booleanisListenerForSource(Object source) Are we listening for these particular changes.voidprocessEvent(SystemEvent event) Process the add/remove event.Methods inherited from class com.sun.faces.context.StateContext.NoopAddRemoveListener
getDynamicActions, getDynamicComponents
-
Constructor Details
-
StatelessAddRemoveListener
-
-
Method Details
-
handleRemove
Handle the remove.- Overrides:
handleRemovein classStateContext.NoopAddRemoveListener- Parameters:
context- the Faces context.component- the UI component to add to the list as a REMOVE.
-
handleAdd
Handle the add.- Overrides:
handleAddin classStateContext.NoopAddRemoveListener- Parameters:
context- the Faces context.component- the UI component to add to the list as an ADD.
-
processEvent
Process the add/remove event.- Specified by:
processEventin interfaceSystemEventListener- Parameters:
event- the add/remove event.- Throws:
AbortProcessingException- when processing should be aborted.
-
isListenerForSource
Are we listening for these particular changes.Note we are only interested in UIComponent adds/removes that are not the UIViewRoot itself.
- Specified by:
isListenerForSourcein interfaceSystemEventListener- Parameters:
source- the source object we might be listening for.- Returns:
- true if the source is OK, false otherwise.
-