java.lang.ObjectProvides the ability to store a model value inside the view's component tree.javax.faces.component.UIParameter
org.apache.myfaces.custom.savestate.UISaveState
JSF provides three scopes for managed beans and therefore all the model objects that the managed beans reference: request, session, application. However a common requirement is a way for a model object to have a scope that is tied to the duration of the current view; that is longer than the request scope but shorter than session scope.
This component simply holds a reference to an arbitrary object (specified by the value property). Because this object is an ordinary component whose scope is the current view, the reference to the model automatically has that same scope.
When the value is an EL expression, then after the view is restored the recreated target object is stored at the specified location.
The object being saved must either:
Note that the saved object can be "chained" from view to view in order to extend its lifetime from a single view to a sequence of views if desired. A UISaveState component with an EL expression such as "#{someBean}" will save the object state after render, and restore it on postback. If navigation occurs to some other view and that view has a UISaveState component with the same EL expression then the object will simply be saved into the new view, thus extending its lifetime.
Manfred - Geiler (latest modification by $Author: paulsp $)$ - Revision: 491777 $ $Date: 2007-01-02 12:27:11 +0100 (Di, 02 Jän 2007) $| Field Summary | ||
|---|---|---|
| public static final String | COMPONENT_TYPE | |
| public static final String | COMPONENT_FAMILY | |
| Constructor: |
|---|
|
| Method from org.apache.myfaces.custom.savestate.UISaveState Summary: |
|---|
| getFamily, restoreState, saveState |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.apache.myfaces.custom.savestate.UISaveState Detail: |
|---|
|
|
|