Announcement Announcement Module
Collapse
No announcement yet.
Triggering a SWF 2.0 flow from rich:menuItem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Triggering a SWF 2.0 flow from rich:menuItem

    I have integrated richfaces 3.2.1.GA into SWF 2.5.5 and was wondering how to trigger a webflow from a richfaces menuItem. Any help would be appreciated.

  • #2
    Have a look at http://forum.springframework.org/showthread.php?t=56318

    Comment


    • #3
      Solved by using onclick

      I actually got this working by using the onclick action as shown below

      <rich:menuItem submitMode="none" value="Golf Courses" onclick="document.location.href='${request.context Path}/courses.html'" />

      Thanks for your help.

      Comment


      • #4
        That's a good one. Funny how you sometimes never think of the solution that stares you right in the face.

        I guess the only problem with that method is that it does not perform the post back but if this is from a page with no information on it to be saved it wont be an issue.

        Comment


        • #5
          But if you think of it, we always use a menu to move from a window to another window without saving anything (on desktop), so an invocation of action in menu would seem weird. Is there any usecases about using menu to invoke an action ? using it as a navigation ?

          Comment


          • #6
            Am sure there are some, but anyway, if it's not a requirement and javascript is always enabled, the way you outlined is the most straight forward.

            Comment


            • #7
              Question on cleaning up the flow

              The only question I have with this approach is that the menu onclick will start a new flow. When the user selects a new menu item which triggers a new flow how will the old flows be terminated or removed?

              Comment


              • #8
                I'm not sure that there is a built in mechanism for this. Of course, the session timeout will remove all flows along with the session.

                I have seen examples of a servlet filter to remove expired flows from the current session.

                The other option would be to disable/enable menu items to ensure that flows are completed prior to invoking another? This would be my preferred option but the first one is valid also. Perhaps you could raise a JIRA issue to have it added.

                Comment

                Working...
                X