View Full Version : problem with action state
khalida
Jun 29th, 2005, 10:17 AM
Hi,
I have a problem in my file "web-flow.xml", my code is:
<action-state id="action.RP01.init">
<action bean="RP01ActionRefresh" method="initForm"/>
<transition on="success" to="action.RP01.refresh"/>
</action-state>
<action-state id="action.RP01.refresh">
<action bean="RP01ActionRefresh" method="bindAndValidate"/>
<action bean="RP01ActionRefresh" method="updateTemplate"/>
<transition on="success" to="view.RP01"/>
</action-state>
why the method "updateTemplate" is not execute?
thanks
Keith Donald
Jun 29th, 2005, 10:22 AM
Read the javadoc documentation for action state, it should tell you :-)
Keith Donald
Jun 29th, 2005, 10:23 AM
I've pasted the javadocs in from the latest revision in CVS:
/**
* A transitionable state that executes one or more actions when entered.
* When the action(s) are executed, this state responds to their result(s) to
* decide to go next.
* <p>
* If more than one action is configured, they are executed in an ordered chain
* until one returns a result event that matches a valid state transition out of
* this state. This is a form of the Chain of Responsibility (CoR) pattern.
* <p>
* The result of an action's execution is treated as a contributing
* criterion for a state transition. In addition, anything else in the
* Flow's <code>RequestContext</code> may be tested as part of custom
* transitional criteria, allowing for sophisticated transition expressions
* that reason on contextual state.
* <p>
* Each action executed by this action state may be provisioned with a set of
* arbitrary properties. These properties are made available to the action
* at execution time.
* <p>
* Common action execution properties include:
* <p>
* <table>
* <th>Property</th><th>Description</th>
* <tr><td valign="top">Name</td>
* <td>The 'name' property is used as a qualifier for action's result event.
* For example, if an action named <code>myAction</code> returns a <code>success</code>
* result, a transition for event <code>myAction.success</code> will be searched,
* and if found, executed. If the action is not named a transition for the base
* <code>success</code> event will be searched and if found, executed.
* <br>
* This is useful in situations where you want to execute actions in an ordered chain as part
* of one action state, and wish to transition on the result of the last one in the chain.
* For example:
* <pre>
* <action-state id="setupForm">
* <action name="setup" bean="myAction" method="setupForm"/>
* <action name="referenceData" bean="myAction" method="setupReferenceData"/>
* <transition on="referenceData.success" to="displayForm"/>
* </action-state>
* </pre>
* The above will trigger the execution of the 'setup' action followed by the 'referenceData' action. The
* flow will then respond to the referenceData 'success' event by transitioning to 'displayForm'.
* </td>
* <tr><td valign="top">Method</td>
* <td>
* The 'method' property is the name of the method on a <code>{@link org.springframework.webflow.action.MultiAction}</code>
* implementation to call when this action is executed. The named method must have the signature
* <code>public Event ${method}(RequestContext)</code>, for example a method property with value
* <code>setupForm</code> would bind to a method on the MultiAction with the signature:
* <code>public Event setupForm(RequestContext context)</code>.
* </td>
* </tr>
* </table>
*
* @see org.springframework.webflow.Action
* @see org.springframework.webflow.action.MultiAction
*
* @author Keith Donald
* @author Erwin Vervaet
*/
khalida
Jun 29th, 2005, 10:44 AM
Thank you for your answer :D
khalida
Powered by vBulletin® Version 4.2.1 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.