我想找到一种方法,如果用户重新启动流程,则不在其中。如果你看看下面的流程,你可以看到用户输入数据,预览并保存。保存后,用户可以返回输入新数据到输入屏幕,但使用我当前的设置,屏幕显示pre -数据。我如何在重新启动时清除它?使用新的模型值重新启动Spring Web Flow
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<var name="customer" class="org.uftwf.domain.Customer"/>
<view-state id="helloworld" view="input.jsp" model="customer" popup="true">
<transition on="submit" to="preview" />
<transition on="cancel" to="thanks" validate="false"/>
</view-state>
<view-state id="preview" model="customer">
<transition on="cancel" to="helloworld"/>
<transition on="accept" to="save">
<evaluate expression="hellowWorldFlowActions.addCustomer(customer)"/>
</transition>
</view-state>
<view-state id="save" model="customer">
<transition on="accept" to="thanks"/>
</view-state>
<view-state id="thanks">
<transition on="restart" to="helloworld"/>
</view-state>
</flow>
我不认为这会工作..如果我在预览页面上取消它不会有任何价值,然后 – 2012-07-26 17:15:25
我的第一个建议,这是真的。不过,你明白了。只要调用你想从新开始的任何转换的'reset()'方法。 (我会更新我的回答,以解释你的取消情况。显然,我没有仔细阅读你的整个流程。) – dbreaux 2012-07-26 17:35:07