Announcement Announcement Module
No announcement yet.
Hwo to go back to a previous view state Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hwo to go back to a previous view state

    I am trying to implement back-navigation in my SWF application. I have to implement my own Back buttons because the modern browsers' back buttons will give user warnings before going back to a POST-generated page, which is an unacceptable behavior for my users.
    I am thinking about two strategies on the server side to implement the Back function:

    1. For each view state, there is a "Back" event transition, which goes to the previous view state in my flow-definition. The problem with this approach is that I may not know what the previous view state is, as it may come from multiple places. To exacerbate this problem, I also have sub-flows containing previous views.

    2. Create my own Stack, and push the view states' flowExecutionKey onto it. When Back() is called, pop the Stack, and go to the previous View state. This seems to be workable. However, I'll have to remember to do the marshalling and pushing in every method call that is originated from a view state.

    Other than the above two, are there any more general (meaning less/no code for me), or even built-in ways from SWF that I can use?
    Thanks in advance.


  • #2

    You can turn on flow execution redirects "always on pause" in 1.0 RC3 and get post+redirect+get automatically each time a view-state is entered. Use of a continuation-based repository gives you browser navigation button behavior. See sellitem sample for an example.