java.lang.Object
org.omnifaces.component.EditableValueHolderStateHelper
Helper class to save and restore state of an
EditableValueHolder.- Author:
- Bauke Scholtz.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(StateHelper stateHelper, String clientId) Returns the state helper of theEditableValueHolderchild associated with the given client ID.voidrestore(EditableValueHolder holder) Restore the state of the givenEditableValueHolder.static voidrestore(FacesContext context, StateHelper stateHelper, Iterator<UIComponent> children) Restore state of anyEditableValueHolderchildren.voidsave(EditableValueHolder holder) Save the state of the givenEditableValueHolder.static voidsave(FacesContext context, StateHelper stateHelper, Iterator<UIComponent> children) Save state of anyEditableValueHolderchildren.
-
Constructor Details
-
EditableValueHolderStateHelper
public EditableValueHolderStateHelper()
-
-
Method Details
-
save
Save the state of the givenEditableValueHolder.- Parameters:
holder- TheEditableValueHolderto save the state for.
-
restore
Restore the state of the givenEditableValueHolder.- Parameters:
holder- TheEditableValueHolderto restore the state for.
-
save
public static void save(FacesContext context, StateHelper stateHelper, Iterator<UIComponent> children) Save state of anyEditableValueHolderchildren.- Parameters:
context- The faces context to work with.stateHelper- The state helper of the parent component.children- An iterator with all child facets and components of the parent component as obtained byUIComponentBase.getFacetsAndChildren().
-
restore
public static void restore(FacesContext context, StateHelper stateHelper, Iterator<UIComponent> children) Restore state of anyEditableValueHolderchildren.- Parameters:
context- The faces context to work with.stateHelper- The state helper of the parent component.children- An iterator with all child facets and components of the parent component as obtained byUIComponentBase.getFacetsAndChildren().
-
get
Returns the state helper of theEditableValueHolderchild associated with the given client ID.- Parameters:
stateHelper- The state helper of the parent component.clientId- The client ID of theEditableValueHolderchild to return the state helper for.- Returns:
- The state helper of the
EditableValueHolderchild associated with the given client ID.
-