public class StateContext extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
StateContext.DynamicAddRemoveListener
A system event listener which is used to listen for changes on the component tree after restore view and before
rendering out the view.
|
class |
StateContext.NoopAddRemoveListener |
class |
StateContext.StatelessAddRemoveListener
An AddRemoveListener that implements the new dynamic component strategy where no state is managed by the listener
itself.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
componentAddedDynamically(jakarta.faces.component.UIComponent c) |
List<ComponentStruct> |
getDynamicActions()
Get the dynamic list (of adds and removes).
|
HashMap<String,jakarta.faces.component.UIComponent> |
getDynamicComponents()
Get the hash map of dynamic components.
|
int |
getIndexOfDynamicallyAddedChildInParent(jakarta.faces.component.UIComponent c) |
static StateContext |
getStateContext(jakarta.faces.context.FacesContext ctx) |
boolean |
hasOneOrMoreDynamicChild(jakarta.faces.component.UIComponent parent) |
boolean |
isPartialStateSaving(jakarta.faces.context.FacesContext ctx,
String viewId) |
static void |
release(jakarta.faces.context.FacesContext facesContext)
Release the state context.
|
void |
setTrackViewModifications(boolean trackMods)
Toggles the current modification tracking status.
|
void |
startTrackViewModifications(jakarta.faces.context.FacesContext ctx,
jakarta.faces.component.UIViewRoot root)
Installs a
SystemEventListener on the UIViewRoot to track components added to or removed
from the view. |
boolean |
trackViewModifications() |
public static void release(jakarta.faces.context.FacesContext facesContext)
facesContext - the Faces context.public static StateContext getStateContext(jakarta.faces.context.FacesContext ctx)
ctx - the FacesContext for the current requestStateContext for this requestpublic boolean isPartialStateSaving(jakarta.faces.context.FacesContext ctx,
String viewId)
ctx - FacesContext.viewId - the view ID to check or null if viewId is unknown.true if partial state saving should be used for the specified view ID, otherwise
falsepublic boolean trackViewModifications()
true if view modifications outside of the initial construction of the view are being tracked.public void startTrackViewModifications(jakarta.faces.context.FacesContext ctx,
jakarta.faces.component.UIViewRoot root)
SystemEventListener on the UIViewRoot to track components added to or removed
from the view.public void setTrackViewModifications(boolean trackMods)
trackMods - if true and the listener installed by
{@link #startTrackViewModifications(jakarta.faces.context.FacesContext, jakarta.faces.component.UIViewRoot) is
present, then view modifications will be tracked. If false, then modification events will be ignored.public boolean componentAddedDynamically(jakarta.faces.component.UIComponent c)
c - the UIComponent to checktrue if the component was added after the initial view constructionpublic int getIndexOfDynamicallyAddedChildInParent(jakarta.faces.component.UIComponent c)
public boolean hasOneOrMoreDynamicChild(jakarta.faces.component.UIComponent parent)
public List<ComponentStruct> getDynamicActions()
Copyright © 2010–2022 JBoss by Red Hat. All rights reserved.