Sharing object across screens, using Spring Webflow

后端 未结 2 1426
情书的邮戳
情书的邮戳 2021-01-24 00:59

I am trying to set up something that will look like a multiple screen process of setting up a booking for example.

  • Screen 1 Add personal information
  • Scree
相关标签:
2条回答
  • 2021-01-24 01:12

    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" />
    
    0 讨论(0)
  • 2021-01-24 01:13

    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

    0 讨论(0)
提交回复
热议问题