| Modifier and Type | Class and Description |
|---|---|
| private abstract class | |
| public class | StateContext.
A system event listener which is used to listen for changes on the component tree after restore view and before rendering out the view. |
| public class | |
| public class | StateContext.
An AddRemoveListener that implements the new dynamic component strategy where no state is managed by the listener itself. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final Logger | |
| private StateContext. | |
| private boolean | |
| private boolean | |
| private ApplicationStateInfo | |
| private boolean | |
| private WeakReference |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the component was added after the initial view constructionthe UIComponent to check c)
|
| private StateContext. | |
| private int | |
| public List | |
| public HashMap | Returns: the hash map of dynamic components.Get the hash map of dynamic components. |
| public int | |
| public static StateContext | Returns: StateContext for this requestthe ctx)FacesContext for the current request
|
| public boolean | |
| private int | |
| public boolean | Returns: true if partial state saving should be used for the specified view ID, otherwise
falseFacesContext. ctx, String the view ID to check or null if viewId is unknown. viewId)
|
| public static void | |
| public void | setTrackViewModifications(boolean
if trackMods)true and the listener installed by
startTrackViewModifications is* present, then view modifications will be tracked.
If false, then modification events will be ignored.Toggles the current modification tracking status. |
| public void | startTrackViewModifications(FacesContext
the involved faces context ctx, UIViewRoot the involved view root root)Installs a |
| public boolean | Returns: true if view modifications outside of the initial construction of the view are being tracked.
|
| KEY | back to summary |
|---|---|
| private static final String KEY | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| modListener | back to summary |
|---|---|
| private StateContext. | |
| partial | back to summary |
|---|---|
| private boolean partial | |
| partialLocked | back to summary |
|---|---|
| private boolean partialLocked | |
| stateInfo | back to summary |
|---|---|
| private ApplicationStateInfo stateInfo | |
| trackMods | back to summary |
|---|---|
| private boolean trackMods | |
| viewRootRef | back to summary |
|---|---|
| private WeakReference<UIViewRoot> viewRootRef | |
| StateContext | back to summary |
|---|---|
| private StateContext(ApplicationStateInfo stateInfo) | |
| componentAddedDynamically | back to summary |
|---|---|
public boolean componentAddedDynamically(UIComponent c)
| |
| createAddRemoveListener | back to summary |
|---|---|
| private StateContext. | |
| decrementDynamicChildCount | back to summary |
|---|---|
| private int decrementDynamicChildCount(FacesContext context, UIComponent parent) | |
| getDynamicActions | back to summary |
|---|---|
| public List Get the dynamic list (of adds and removes).
| |
| getDynamicComponents | back to summary |
|---|---|
| public HashMap Get the hash map of dynamic components.
| |
| getIndexOfDynamicallyAddedChildInParent | back to summary |
|---|---|
| public int getIndexOfDynamicallyAddedChildInParent(UIComponent c) | |
| getStateContext | back to summary |
|---|---|
public static StateContext getStateContext(FacesContext ctx)
| |
| hasOneOrMoreDynamicChild | back to summary |
|---|---|
| public boolean hasOneOrMoreDynamicChild(UIComponent parent) | |
| incrementDynamicChildCount | back to summary |
|---|---|
| private int incrementDynamicChildCount(FacesContext context, UIComponent parent) | |
| isPartialStateSaving | back to summary |
|---|---|
public boolean isPartialStateSaving(FacesContext ctx, String viewId)
| |
| release | back to summary |
|---|---|
| public static void release(FacesContext facesContext) Release the state context.
| |
| setTrackViewModifications | back to summary |
|---|---|
| public void setTrackViewModifications(boolean trackMods) Toggles the current modification tracking status.
| |
| startTrackViewModifications | back to summary |
|---|---|
| public void startTrackViewModifications(FacesContext ctx, UIViewRoot root) Installs a
| |
| trackViewModifications | back to summary |
|---|---|
public boolean trackViewModifications()
| |
| Modifier and Type | Field and Description |
|---|---|
| private StateContext | stateCtx
Stores the state context we work for, |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract List | |
| public abstract HashMap | Returns: the hash map of dynamic components.Get the hash map of dynamic components. |
| protected abstract void | handleAdd(FacesContext
the Faces context. context, UIComponent the UI component to add to the list as an ADD. component)Handle the add. |
| protected abstract void | handleRemove(FacesContext
the Faces context. context, UIComponent the UI component to add to the list as a REMOVE. component)Handle the remove. |
| public boolean | Returns: true if the source is OK, false otherwise.the source object we might be listening for. source)Implements jakarta. Are we listening for these particular changes. |
| public void | processEvent(SystemEvent
the add/remove event. event)Implements jakarta. Process the add/remove event. |
| stateCtx | back to summary |
|---|---|
| private StateContext stateCtx Stores the state context we work for, | |
| AddRemoveListener | back to summary |
|---|---|
| protected AddRemoveListener(FacesContext context) Constructor.
| |
| getDynamicActions | back to summary |
|---|---|
| public abstract List Get the list of adds/removes.
| |
| getDynamicComponents | back to summary |
|---|---|
| public abstract HashMap Get the hash map of dynamic components.
| |
| handleAdd | back to summary |
|---|---|
| protected abstract void handleAdd(FacesContext context, UIComponent component) Handle the add.
| |
| handleRemove | back to summary |
|---|---|
| protected abstract void handleRemove(FacesContext context, UIComponent component) Handle the remove.
| |
| isListenerForSource | back to summary |
|---|---|
| public boolean isListenerForSource(Object source) Implements jakarta. Are we listening for these particular changes. Note we are only interested in UIComponent adds/removes that are not the UIViewRoot itself. | |
| processEvent | back to summary |
|---|---|
| public void processEvent(SystemEvent event) throws AbortProcessingException Implements jakarta. Process the add/remove event.
| |
| Modifier and Type | Field and Description |
|---|---|
| private List | dynamicActions
Stores the list of adds/removes. |
| private transient HashMap | dynamicComponents
Stores the hash map of dynamic components. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private String | Returns: the facet name or null if the component is not the value of a facets map entry.the component to look for in the facets map entry value. component)Return the facet name for the given component or null if the component is not the value of a facets map entry. |
| public List | Returns: the list of adds/removes.Implements abstract com. Get the list of adds/removes. |
| public HashMap | Returns: the hash map of dynamic components.Implements abstract com. Get the hash map of dynamic components. |
| protected void | handleAdd(FacesContext
the Faces context. context, UIComponent the UI component to add to the list as an ADD. component)Implements abstract com. Handle the add. |
| private void | handleAddRemoveWithAutoPrune(UIComponent
the UI component. component, ComponentStruct the dynamic action. struct)Methods that takes care of pruning and adding an action to the dynamic action list. |
| protected void | handleRemove(FacesContext
the Faces context. context, UIComponent the UI component to add to the list as a REMOVE. component)Implements abstract com. Handle the remove. |
| dynamicActions | back to summary |
|---|---|
| private List<ComponentStruct> dynamicActions Stores the list of adds/removes. | |
| dynamicComponents | back to summary |
|---|---|
| private transient HashMap<String, UIComponent> dynamicComponents Stores the hash map of dynamic components. | |
| DynamicAddRemoveListener | back to summary |
|---|---|
| public DynamicAddRemoveListener(FacesContext context) Constructor.
| |
| findFacetNameForComponent | back to summary |
|---|---|
| private String findFacetNameForComponent(UIComponent component) Return the facet name for the given component or null if the component is not the value of a facets map entry.
| |
| getDynamicActions | back to summary |
|---|---|
| public List Implements abstract com. Get the list of adds/removes.
| |
| getDynamicComponents | back to summary |
|---|---|
| public HashMap Implements abstract com. Get the hash map of dynamic components.
| |
| handleAdd | back to summary |
|---|---|
| protected void handleAdd(FacesContext context, UIComponent component) Implements abstract com. Handle the add.
| |
| handleAddRemoveWithAutoPrune | back to summary |
|---|---|
| private void handleAddRemoveWithAutoPrune(UIComponent component, ComponentStruct struct) Methods that takes care of pruning and adding an action to the dynamic action list. If you add a component and the dynamic action list does not contain the component yet then add it to the dynamic action list, regardless whether or not if was an ADD or REMOVE.
Else if you add a component and it is already in the dynamic action
list and it is the only action for that client id in the dynamic
action list then:
1) If the previous action was an ADD then
a) If the current action is a REMOVE then remove the component
out of the dynamic action list.
b) If the current action is an ADD then throw a FacesException.
2) If the previous action was a REMOVE then
a) If the current action is an ADD then add it to the dynamic
action list.
b) If the current action is a REMOVE then throw a FacesException.
Else if a REMOVE and ADD where captured before then:
1) If the current action is REMOVE then remove the last dynamic
action out of the dynamic action list.
2) If the current action is ADD then throw a FacesException.
| |
| handleRemove | back to summary |
|---|---|
| protected void handleRemove(FacesContext context, UIComponent component) Implements abstract com. Handle the remove.
| |
| Modifier and Type | Field and Description |
|---|---|
| private HashMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public List | getDynamicActions()
Implements abstract com. Get the list of adds/removes. |
| public HashMap | getDynamicComponents()
Implements abstract com. Get the hash map of dynamic components. |
| protected void | handleAdd(FacesContext
the Faces context. context, UIComponent the UI component to add to the list as an ADD. component)Implements abstract com. Handle the add. |
| protected void | handleRemove(FacesContext
the Faces context. context, UIComponent the UI component to add to the list as a REMOVE. component)Implements abstract com. Handle the remove. |
| emptyComponentsMap | back to summary |
|---|---|
| private HashMap<K, V> emptyComponentsMap | |
| NoopAddRemoveListener | back to summary |
|---|---|
| public NoopAddRemoveListener(FacesContext context) | |
| getDynamicActions | back to summary |
|---|---|
| public List Implements abstract com. Doc from com. Get the list of adds/removes.
| |
| getDynamicComponents | back to summary |
|---|---|
| public HashMap Implements abstract com. Doc from com. Get the hash map of dynamic components.
| |
| handleAdd | back to summary |
|---|---|
| protected void handleAdd(FacesContext context, UIComponent component) Implements abstract com. Doc from com. Handle the add.
| |
| handleRemove | back to summary |
|---|---|
| protected void handleRemove(FacesContext context, UIComponent component) Implements abstract com. Doc from com. Handle the remove.
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private void | |
| private Collection | |
| private Collection | |
| protected void | handleAdd(FacesContext
the Faces context. context, UIComponent the UI component to add to the list as an ADD. component)Overrides com. Handle the add. |
| protected void | handleRemove(FacesContext
the Faces context. context, UIComponent the UI component to add to the list as a REMOVE. component)Overrides com. Handle the remove. |
| private void | |
| private boolean | |
| private boolean |
| DYNAMIC_COMPONENT_ADD_COLLECTION | back to summary |
|---|---|
| private static final String DYNAMIC_COMPONENT_ADD_COLLECTION | |
| StatelessAddRemoveListener | back to summary |
|---|---|
| public StatelessAddRemoveListener(FacesContext context) | |
| childAddedToSameParentAsBefore | back to summary |
|---|---|
| private boolean childAddedToSameParentAsBefore(UIComponent parent, String childTagId) | |
| childRemovedFromParent | back to summary |
|---|---|
| private void childRemovedFromParent(UIComponent parent, String childTagId) | |
| getDynamicComponentCollection | back to summary |
|---|---|
| private Collection | |
| getPreviouslyRemovedChildren | back to summary |
|---|---|
| private Collection | |
| handleAdd | back to summary |
|---|---|
| protected void handleAdd(FacesContext context, UIComponent component) Overrides com. Doc from com. Handle the add.
| |
| handleRemove | back to summary |
|---|---|
| protected void handleRemove(FacesContext context, UIComponent component) Overrides com. Doc from com. Handle the remove.
| |
| markChildrenModified | back to summary |
|---|---|
| private void markChildrenModified(UIComponent parent) | |
| thisEventCorrespondsToSubtreeRootAdd | back to summary |
|---|---|
| private boolean thisEventCorrespondsToSubtreeRootAdd(FacesContext context, UIComponent c) | |
| thisEventCorrespondsToSubtreeRootRemove | back to summary |
|---|---|
| private boolean thisEventCorrespondsToSubtreeRootRemove(FacesContext context, UIComponent c) | |