Class ViewVariable
java.lang.Object
org.springframework.webflow.core.AnnotatedObject
org.springframework.webflow.engine.ViewVariable
- All Implemented Interfaces:
Annotated
A variable scoped to a particular view. Such a variable is allocated when a view-state is entered and destroyed when
that view-state exits. The flow scope map is used as the backing variable store.
- Author:
- Keith Donald
-
Field Summary
Fields inherited from class org.springframework.webflow.core.AnnotatedObject
CAPTION_PROPERTY, DESCRIPTION_PROPERTY
-
Constructor Summary
ConstructorDescriptionViewVariable
(String name, VariableValueFactory valueFactory) Creates a new view variable. -
Method Summary
Modifier and TypeMethodDescriptionvoid
create
(RequestContext context) Creates this view variable.destroy
(RequestContext context) Destroy this view variable.boolean
getName()
Returns the name of this view variable.Returns the source of the variable's initial value.int
hashCode()
void
restore
(RequestContext context) Restores this view variable's dependencies.Methods inherited from class org.springframework.webflow.core.AnnotatedObject
getAttributes, getCaption, getDescription, setCaption, setDescription
-
Constructor Details
-
ViewVariable
Creates a new view variable.- Parameters:
name
- the name of the variablevalueFactory
- the source for the variable value
-
-
Method Details
-
getName
Returns the name of this view variable. -
getValueFactory
Returns the source of the variable's initial value. -
equals
-
hashCode
public int hashCode() -
create
Creates this view variable. This method allocates the variable's value in flow scope.- Parameters:
context
- the executing flow
-
restore
Restores this view variable's dependencies. This method asks the variable's value factory to restore any references the variable has to transient objects.- Parameters:
context
- the executing flow
-
destroy
Destroy this view variable. This method removes the variable's value in flow scope.- Parameters:
context
- the executing flow
-