java.lang.Object
com.sun.faces.context.StateContext
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA system event listener which is used to listen for changes on the component tree after restore view and before rendering out the view.classclassAn AddRemoveListener that implements the new dynamic component strategy where no state is managed by the listener itself. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGet the dynamic list (of adds and removes).Get the hash map of dynamic components.intstatic StateContextbooleanhasOneOrMoreDynamicChild(UIComponent parent) booleanisPartialStateSaving(FacesContext ctx, String viewId) static voidrelease(FacesContext facesContext) Release the state context.voidsetTrackViewModifications(boolean trackMods) Toggles the current modification tracking status.voidstartTrackViewModifications(FacesContext ctx, UIViewRoot root) Installs aSystemEventListeneron theUIViewRootto track components added to or removed from the view.boolean
-
Method Details
-
release
Release the state context.- Parameters:
facesContext- the Faces context.
-
getStateContext
- Parameters:
ctx- theFacesContextfor the current request- Returns:
StateContextfor this request
-
isPartialStateSaving
- Parameters:
ctx- FacesContext.viewId- the view ID to check or null if viewId is unknown.- Returns:
trueif partial state saving should be used for the specified view ID, otherwisefalse
-
trackViewModifications
public boolean trackViewModifications()- Returns:
trueif view modifications outside of the initial construction of the view are being tracked.
-
startTrackViewModifications
Installs aSystemEventListeneron theUIViewRootto track components added to or removed from the view.- Parameters:
ctx- the involved faces contextroot- the involved view root
-
setTrackViewModifications
public void setTrackViewModifications(boolean trackMods) Toggles the current modification tracking status.- Parameters:
trackMods- iftrueand the listener installed bystartTrackViewModificationsis* present, then view modifications will be tracked. Iffalse, then modification events will be ignored.
-
componentAddedDynamically
- Parameters:
c- the UIComponent to check- Returns:
trueif the component was added after the initial view construction
-
getIndexOfDynamicallyAddedChildInParent
-
hasOneOrMoreDynamicChild
-
getDynamicActions
Get the dynamic list (of adds and removes).- Returns:
- the dynamic list
-
getDynamicComponents
Get the hash map of dynamic components.- Returns:
- the hash map of dynamic components.
-