Action implementation that bundles two or more action execution methods into
a single class. Action execution methods defined by subclasses must adhere to
the following signature:
public Event ${method}(RequestContext context) throws Exception;
When this action is invoked, by default the id of the calling
action state state is treated as the action execution method name.
Alternatively, the execution method name may be explicitly specified as a
attribute of the calling action state.
For example, the following action state definition:
<action-state id="search">
<action bean="searchAction"/>
<transition on="success" to="results"/>
</action-state>
... when entered, executes the method:
public Event search(RequestContext context) throws Exception;
Alternatively (and typically recommended), you may explictly specify the method name:
<action-state id="search">
<action bean="searchAction" method="executeSearch"/>
<transition on="success" to="results"/>
</action-state>
A typical use of the MultiAction is to centralize all command logic for a
flow in one place. Another common use is to centralize form setup and submit
logic in one place, or CRUD (create/read/update/delete) operations for a
single domain object in one place.
See Also: MultiAction.MethodResolver See Also: org.springframework.webflow.action.DefaultMultiActionMethodResolver author: Keith Donald author: Erwin Vervaet |