Sharing object across screens, using Spring Webflow

纵然是瞬间 提交于 2019-12-02 03:35:55

From what it looks that you need to share object between Multiple flows. I guess you can store object in session scope

so

<beans:bean id="bookingBean" class="com.mycompany.myapp.BookingIpl" scope="prototype" />

Would be changed to

<beans:bean id="bookingBean" class="com.mycompany.myapp.BookingIpl" scope="session" />

Using session scoped not best way when using Spring Webflow. If you want to share objects between the screens/flows use conversation scope. Use flow scope if you need to share the object between the screens in the same flow.

SWF scopes are in a way specialised form of session and request scopes defined in http session.

Anything needed across the application should be stored in http session object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!