Return an opaque Object
containing sufficient information for this same instance to restore the state of the current {@link UIViewRoot} on a subsequent request. The returnedobject must implement java.io.Serializable
. If there is no state information to be saved, return null
instead.
Components may opt out of being included in the serialized view by setting their transient
property to true
. This must cause the component itself, as well as all of that component's children and facets, to be omitted from the saved tree structure and component state information.
This method must also enforce the rule that, for components with non-null id
s, all components that are descendants of the same nearest {@link NamingContainer} must have unique identifiers.
For backwards compatability with existing StateManager
implementations, the default implementation of this method calls {@link #saveSerializedView}and creates and returns a two element Object
array with element zero containing the structure
property and element one containing the state
property of the SerializedView
.
@param context {@link FacesContext} for the current request
@throws IllegalStateException if more than one component orfacet within the same {@link NamingContainer} in this view hasthe same non-
null
component id
@since 1.2