Tomahawk tag library 1.2.
Tag saveState


Provides the ability to store a model value inside the view's component tree.

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.



Tag Information
Tag Classorg.apache.myfaces.custom.savestate.SaveStateTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
valuefalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.Object)
The value of this component.
idfalsetruejava.lang.StringGet a string which uniquely identifies this UIComponent within the scope of the nearest ancestor NamingContainer component. The id is not necessarily unique across all components in the current view.
bindingfalsefalsejavax.el.ValueExpression
(must evaluate to javax.faces.component.UIComponent)
Identifies a backing bean property (of type UIComponent or appropriate subclass) to bind to this component instance. This value must be an EL expression.

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.