This interface is implemented by classes that need to save their state between requests.
An implementor must implement both saveState and restoreState methods in this class, since
these two methods have a tightly coupled contract between themselves.
In other words, if there is an ineritance hierarchy, it is not
permissable to have the saveState and restoreState
methods reside at different levels of the hierarchy.
An implementor must have a public no-args constructor.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if transient, false otherwise.If true, the Object implementing this interface must not participate in state saving or restoring. |
| public void | restoreState(FacesContext
the Faces context. context, Object the state. state)Perform any processing required to restore the state from the entries in the state Object. |
| public Object | Returns: the saved state.the Faces context. context) Gets the state of the instance as a
|
| public void | setTransient(boolean
boolean pass newTransientValue)true if this
Object will not
participate in state saving or restoring, otherwise pass
false.Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring. |
| isTransient | back to summary |
|---|---|
| public boolean isTransient() If true, the Object implementing this interface must not participate in state saving or restoring.
| |
| restoreState | back to summary |
|---|---|
| public void restoreState(FacesContext context, Object state) Perform any processing required to restore the state from the entries in the state Object. If the class that implements this interface has references to
instances that also implement StateHolder (such as a
If the
| |
| saveState | back to summary |
|---|---|
| public Object saveState(FacesContext context) Gets the state of the instance as a
If the class that implements this interface has references to
instances that implement StateHolder (such as a
This method must not alter the state of the implementing object. In other words, after executing this code:
The return from this method must be
| |
| setTransient | back to summary |
|---|---|
| public void setTransient(boolean newTransientValue) Denotes whether or not the Object implementing this interface must or must not participate in state saving or restoring.
| |