Results 1 to 3 of 3

Thread: Flash scope in a custom FlowHandler

  1. #1
    Join Date
    Oct 2010
    Location
    Atlanta, GA
    Posts
    8

    Default 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. #2

    Default 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.

  3. #3

    Default

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •