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
public class StateContext.StatelessAddRemoveListener extends StateContext.NoopAddRemoveListener
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 Constructor Description StatelessAddRemoveListener(FacesContext context)
-
Method Summary
Modifier and Type Method Description protected void
handleAdd(FacesContext context, UIComponent component)
Handle the add.protected void
handleRemove(FacesContext context, UIComponent component)
Handle the remove.boolean
isListenerForSource(Object source)
Are we listening for these particular changes.void
processEvent(SystemEvent event)
Process the add/remove event.Methods inherited from class com.sun.faces.context.StateContext.NoopAddRemoveListener
getDynamicActions, getDynamicComponents
-
Constructor Details
-
Method Details
-
handleRemove
Handle the remove.- Overrides:
handleRemove
in classStateContext.NoopAddRemoveListener
- Parameters:
context
- the Faces context.component
- the UI component to add to the list as a REMOVE.
-
handleAdd
Handle the add.- Overrides:
handleAdd
in 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:
processEvent
in 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:
isListenerForSource
in interfaceSystemEventListener
- Parameters:
source
- the source object we might be listening for.- Returns:
- true if the source is OK, false otherwise.
-