我正在尝试在spring webflow xml定义中设置会话范围内的变量,并且找不到找到的属性..请帮助
118484 [http-8080-6] DEBUG servlet.YBRServlet - 处理程序执行 导致异常 - 转发到已解决的错误视图: ModelAndView:引用名为'Err010DfltCrtc'的视图;模特是 {例外= org.springframework.webflow.execution.ActionExecutionException: 抛出异常执行[AnnotatedAction @ 87ba9e targetAction = [SetAction @ 1ed364c name = flowRequestContext.externalContext.sessionMap.testCompleted,value = 是],在属性'AnnIncr'的流程中属性= map [[empty]]] 'QlfyEnrl' - 动作执行属性是'map [[empty]]'} org.springframework.webflow.execution.ActionExecutionException: 抛出异常执行[AnnotatedAction @ 87ba9e targetAction = [SetAction @ 1ed364c name = flowRequestContext.externalContext.sessionMap.testCompleted,value = 是],在属性'AnnIncr'的流程中属性= map [[empty]]] 'QlfyEnrl' - 动作执行属性是'map [[empty]]'at org.springframework.webflow.execution.ActionExecutor.execute(ActionExecutor.java:60) 在 org.springframework.webflow.engine.ActionList.execute(ActionList.java:155) 在org.springframework.webflow.engine.State.enter(State.java:193)at org.springframework.webflow.engine.Transition.execute(Transition.java:227) 在 org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51) 引起: org.springframework.binding.expression.PropertyNotFoundException: 物业未找到 org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:87) 在
org.springframework.expression.spel.SpelEvaluationException: EL1008E * :( pos 0):无法在 *的对象上找到字段或属性“是” 类型 'org.springframework.webflow.engine.impl.RequestControlContextImpl' 在 org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:180) 在 org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:60) 在 org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102) 在 org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:97) 在 org.springframework.binding.expression.spel.SpringELExpression.getValue(SpringELExpression.java:84) ... 88更多
流程代码
<view-state id="AnnIncr" view="AnnIncr" model="ssModel">
<on-entry>
<set name="flowRequestContext.externalContext.sessionMap.testCompleted" value="yes"></set>
</on-entry>
.....
<on-exit>
<set name="flowRequestContext.externalContext.sessionMap.testCompleted" value="no"></set>
</on-exit>
</view-state>
答案 0 :(得分:8)
我发现问题,在双引号内我必须用单引号将值包装起来将其表示为一个值,否则它会在这里表达一个表达式。
<set name="flowRequestContext.externalContext.sessionMap.testCompleted" value="yes"></set>
应该是
<set name="flowRequestContext.externalContext.sessionMap.testCompleted" value="'yes'"></set>