开发者

Returning value (output) from web flow

I am using spring web-flow 2.0 and I need to return a variable from sub-flow to parent flow like:

<end-state id="end" >
    <output name="mvViewBean" value="viewBean" />
<开发者_如何学编程;/end-state>    

and use it inside my parent flow like :

<subflow-state id="updateSubflowState" subflow="mv-update" >
    <on-exit>
        <evaluate expression="mvService.onblabla(mvViewBean)" />
    </on-exit>
</subflow-state>

Do i need to define variable definitions or something else?


Just came across this issue...The currentEvent does work, but if you indicate that you accept the variable in your updateSubflowState through a

    <output name="mvViewBean" value="flowScope.mvViewBean"/>

then you will be able to access it as mvViewBean.


Yo can get the output values getting attribute in currentEvent.

<subflow-state id="updateSubflowState" subflow="mv-update" >
    <on-exit>
        <evaluate expression="mvService.onblabla(currentEvent.attributes.mvViewBean)" />
    </on-exit>
</subflow-state>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜