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(UIComponent c) |
List<ComponentStruct> |
getDynamicActions()
Get the dynamic list (of adds and removes).
|
HashMap<String,UIComponent> |
getDynamicComponents()
Get the hash map of dynamic components.
|
int |
getIndexOfDynamicallyAddedChildInParent(UIComponent c) |
static StateContext |
getStateContext(FacesContext ctx) |
boolean |
hasOneOrMoreDynamicChild(UIComponent parent) |
boolean |
isPartialStateSaving(FacesContext ctx,
String viewId) |
static void |
release(FacesContext facesContext)
Release the state context.
|
void |
setTrackViewModifications(boolean trackMods)
Toggles the current modification tracking status.
|
void |
startTrackViewModifications(FacesContext ctx,
UIViewRoot root)
Installs a
SystemEventListener on the UIViewRoot
to track components added to or removed from the view. |
boolean |
trackViewModifications() |
public static void release(FacesContext facesContext)
facesContext
- the Faces context.public static StateContext getStateContext(FacesContext ctx)
ctx
- the FacesContext
for the current requestStateContext
for this requestpublic boolean isPartialStateSaving(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 false
public boolean trackViewModifications()
true
if view modifications outside of the initial
construction of the view are being tracked.public void startTrackViewModifications(FacesContext ctx, 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(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot)
is present, then view modifications will be tracked. If
false
, then modification events will be ignored.public boolean componentAddedDynamically(UIComponent c)
c
- the UIComponent to checktrue
if the component was added after the initial
view constructionpublic int getIndexOfDynamicallyAddedChildInParent(UIComponent c)
public boolean hasOneOrMoreDynamicChild(UIComponent parent)
public List<ComponentStruct> getDynamicActions()
public HashMap<String,UIComponent> getDynamicComponents()
Comments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.