public class ViewState extends TransitionableState
ViewState
delegates to a ViewFactory
.ViewFactory
CAPTION_PROPERTY, DESCRIPTION_PROPERTY
Constructor and Description |
---|
ViewState(Flow flow,
String id,
ViewFactory viewFactory)
Create a new view state.
|
Modifier and Type | Method and Description |
---|---|
void |
addVariable(ViewVariable variable)
Adds a view variable.
|
void |
addVariables(ViewVariable[] variables)
Adds a set of view variables.
|
void |
exit(RequestControlContext context)
Exit this state.
|
boolean |
getPopup()
Returns whether this view state should render as a popup.
|
boolean |
getRedirect()
Returns whether this view state should request a flow execution redirect when entered.
|
ActionList |
getRenderActionList()
Returns the list of actions executable by this view state on entry and on refresh.
|
ViewVariable |
getVariable(String name)
Returns the view variable with the given name.
|
ViewVariable[] |
getVariables()
Returns the configured view variables.
|
ViewFactory |
getViewFactory()
Returns the view factory.
|
boolean |
isViewState()
Returns true if this state is a view state.
|
void |
resume(RequestControlContext context) |
void |
setPopup(boolean popup)
Sets whether this view state should render as a popup.
|
void |
setRedirect(Boolean redirect)
Sets whether this view state should requests a flow execution redirect when entered.
|
getExitActionList, getRequiredTransition, getTransition, getTransitions, getTransitionSet, handleEvent
enter, equals, getEntryActionList, getExceptionHandlerSet, getFlow, getId, getOwner, handleException, hashCode, isStartState, toString
getAttributes, getCaption, getDescription, setCaption, setDescription
getId, getOwner
getAttributes, getCaption, getDescription
public ViewState(Flow flow, String id, ViewFactory viewFactory) throws IllegalArgumentException
flow
- the owning flowid
- the state identifier (must be unique to the flow)viewFactory
- the view factoryIllegalArgumentException
- when this state cannot be added to given flow, e.g. because the id is not uniquepublic boolean isViewState()
StateDefinition
isViewState
in interface StateDefinition
isViewState
in class State
public void addVariable(ViewVariable variable)
variable
- the variablepublic void addVariables(ViewVariable[] variables)
variables
- the variablespublic ViewVariable getVariable(String name)
name
- the name of the variablepublic ViewVariable[] getVariables()
public boolean getRedirect()
public void setRedirect(Boolean redirect)
redirect
- the redirect flagpublic boolean getPopup()
public void setPopup(boolean popup)
popup
- the popup flagpublic ViewFactory getViewFactory()
public ActionList getRenderActionList()
public void resume(RequestControlContext context)
public void exit(RequestControlContext context)
TransitionableState
exit
in class TransitionableState
context
- the flow control context