Announcement Announcement Module
Collapse
No announcement yet.
Flash scope in a custom FlowHandler Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Flash scope in a custom FlowHandler

    I would like to be able to put a message into flash scope from the handleExecutionOutcome method of a flow handler (extends AbstractFlowHandler). My initial thought was that I could add RedirectAttributes to the method signature like so:

    Code:
    public String handleExecutionOutcome(FlowExecutionOutcome outcome, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes){
        ...
        ...
        ...
        redirectAttributes.addFlashAttribute("messages", "This is my message");
    
    ....
    }
    Alas, when I do this the handleExecutionOutcome method is ignored.

    My question is if anyone knows how to access flow scope from such a handler?

  • #2
    Me too

    Replying because I want to access FlashScope from a FlowHandler as well. In my case, because I want to add a message for display whenever an expired HttpSession causes SWF to start the user over again at the first state.

    Mind you, I'd be happy for another solution to this as well, but this one *was* looking more promising than the previous filter/interceptor approach I've been using.

    Comment


    • #3
      This seems to me the right solution for the problem as it is described on the official site. http://static.springsource.org/sprin...l/ch10s04.html

      When I register the bean the method isn't called.

      Comment

      Working...
      X