java - Spring Web 流程中 Action 状态下的多个求值表达式问题

标签 java spring spring-mvc spring-webflow spring-webflow-2

我有一个 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/

相关文章:

java - 缺少订阅注册 : The subscription is not registered to use namespace 'Microsoft.Storage'

java - 将 actionBar 主题更改为 Holo.Light?

java - 将单个 @Component 实例变成多个实例的最佳方法是什么?

spring-mvc - 用于 Restful 和正常的 Spring MVC ExceptionHandler

java - spring mvc @ExceptionHandler 方法获得相同的 View

java - 可选属性的类层次结构设计

java - 虚假错误 "The project description file (.project) is missing"

java - 如何在 spring-batch 中将参数从 ItemReader 传递到 ItemProcessor?

java - Spring 中由于基于 Profile 的注入(inject)而导致循环引用

java - Spring 3 MVC 和 JSR303 @Valid 不起作用 BindingResult haserrors 始终为 false