我有一个 Spring WebFlow2 项目,如果用户单击“loadschools”提交按钮,我将调用我的控制器并加载状态,然后根据选中的单选按钮重新显示具有新状态的同一屏幕。如果用户单击单选按钮,我想删除“loadschool”提交按钮并运行 java 脚本。可以这样做吗?我如何告诉 webflow 过渡运行?
<view-state id="SchoolVisitReport" view="SchoolVisitReport.jsp" model="visit" >
<transition on="submit" to="addVisit">
<evaluate expression="flowActions.validateVisit(visit, messageContext)"/>
</transition>
<transition on="cancel" to="endState" bind="false"/>
<transition on="loadSchools" to="SchoolVisitReport" >
<evaluate expression="flowActions.initializeSelectableStates(visit)" result="flowScope.selectableStates"/>
</transition>
</view-state>