org.omnifaces.component
Class EditableValueHolderStateHelper

java.lang.Object
  extended by org.omnifaces.component.EditableValueHolderStateHelper

public final class EditableValueHolderStateHelper
extends java.lang.Object

Helper class to save and restore state of an EditableValueHolder.

Author:
Bauke Scholtz.

Constructor Summary
EditableValueHolderStateHelper()
           
 
Method Summary
static EditableValueHolderStateHelper get(javax.faces.component.StateHelper stateHelper, java.lang.String clientId)
          Returns the state helper of the EditableValueHolder child associated with the given client ID.
 void restore(javax.faces.component.EditableValueHolder holder)
          Restore the state of the given EditableValueHolder.
static void restore(javax.faces.context.FacesContext context, javax.faces.component.StateHelper stateHelper, java.util.Iterator<javax.faces.component.UIComponent> children)
          Restore state of any EditableValueHolder children.
 void save(javax.faces.component.EditableValueHolder holder)
          Save the state of the given EditableValueHolder.
static void save(javax.faces.context.FacesContext context, javax.faces.component.StateHelper stateHelper, java.util.Iterator<javax.faces.component.UIComponent> children)
          Save state of any EditableValueHolder children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditableValueHolderStateHelper

public EditableValueHolderStateHelper()
Method Detail

save

public void save(javax.faces.component.EditableValueHolder holder)
Save the state of the given EditableValueHolder.

Parameters:
holder - The EditableValueHolder to save the state for.

restore

public void restore(javax.faces.component.EditableValueHolder holder)
Restore the state of the given EditableValueHolder.

Parameters:
holder - The EditableValueHolder to restore the state for.

save

public static void save(javax.faces.context.FacesContext context,
                        javax.faces.component.StateHelper stateHelper,
                        java.util.Iterator<javax.faces.component.UIComponent> children)
Save state of any EditableValueHolder children.

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 by UIComponentBase.getFacetsAndChildren().

restore

public static void restore(javax.faces.context.FacesContext context,
                           javax.faces.component.StateHelper stateHelper,
                           java.util.Iterator<javax.faces.component.UIComponent> children)
Restore state of any EditableValueHolder children.

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 by UIComponentBase.getFacetsAndChildren().

get

public static EditableValueHolderStateHelper get(javax.faces.component.StateHelper stateHelper,
                                                 java.lang.String clientId)
Returns the state helper of the EditableValueHolder child associated with the given client ID.

Parameters:
stateHelper - The state helper of the parent component.
clientId - The client ID of the EditableValueHolder child to return the state helper for.
Returns:
The state helper of the EditableValueHolder child associated with the given client ID.