如何将请求参数发送到spring webflow控制器

时间:2014-02-10 11:05:35

标签: java spring spring-mvc spring-webflow

我是webflow的新手,我尝试使用下面的代码,这是错误的......

<view-state id="displayAllTasks" view="/WEB-INF/flows/jsp/displayAllTasks.jsp" model="workflowSet">
 <on-render>
   <set name="requestScope.state" value="requestParameters.state"/>       
   <evaluate expression="workflowController.getAllTasksByState(requestParameters.state)" result="viewScope.workflowSet"></evaluate>
 </on-render>

1 个答案:

答案 0 :(得分:1)

使用on-entry替换on-render标记,它将起作用。

<view-state id="displayAllTasks" view="/WEB-INF/flows/jsp/displayAllTasks.jsp" model="workflowSet">
<on-entry>
<set name="requestScope.state" value="requestParameters.state"/>       
<evaluate expression="workflowController.getAllTasksByState(requestParameters.state)"   result="viewScope.workflowSet"></evaluate>
</on-entry>