我有一个 Action 状态,我需要执行两个求值表达式,其中两个表达式都将返回相应的 bean。我的问题是在我的操作状态下,只有一个评估表达式在以下代码中执行,
<action-state id="confirmState">
<evaluate expression="myController.getConfirmPage(flowRequestContext,conversationScope.studentTypeBean)" result="conversationScope.studentTypeBean"/>
<evaluate expression="myPageController.getHomePage(flowRequestContext)" result="conversationScope.studentBean" />
<transition to="studentConfirm"></transition>
</action-state>
有些教程说要执行多个求值表达式,第一个表达式需要返回 true 才能执行第二个表达式,是这样吗?但在我的例子中,我想返回一个 bean 而不是 boolean 值。我该如何解决这个问题?
最佳答案
我遇到了同样的问题。我发现这对我有用:
<action-state id="confirmState">
<evaluate expression="myController.getConfirmPage(flowRequestContext,conversationScope.studentTypeBean)" result="conversationScope.studentTypeBean"/>
<transition to="studentConfirm">
<evaluate expression="myPageController.getHomePage(flowRequestContext)" result="conversationScope.studentBean" />
</transition>
</action-state>
关于java - Spring Web 流程中 Action 状态下的多个求值表达式问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36996343/