2 Replies Latest reply on Jan 21, 2007 3:39 PM by svadu

    Basic questions about conversations

      Hi,

      I guess the answer to my question may be simple so please excuse me in advance for asking possibly stupid questions :)
      My general problem with conversations is that I have to use @Begin(join=true) everywhere I want to make the extend the conversation life-time otherwise I am getting illegal state exception if I encounter a @begin.

      So the first question is whether the purpose of @begin (without join=true) is to provide some kind of error control (preventing issues with the back button?). If so what would be a typical use-case other than just getting an error screen or forwarding to a exception page?

      And the second question which is also kind of related to the first one is that I would like to know whether it is possible to end a conversation upon leaving a page other than calling a certain method? I am curious about that because if I want to start a brand new conversation (without multiplying nested or joining existing conversations) when I navigate to another page (for example by using a bookmark or navigating in history).

        • 1. Re: Basic questions about conversations
          pmuir

          There are a number of ways of starting and ending a conversation

          1) @Begin/@End
          2) s:conversationPropagation
          3) endConversation/beginConversation in pages.xml
          4) endConversation in pageflows

          Also, you should note that conversations are not propagated over non-faces request (i.e. clicking on a bookmarK)

          I will often start a conversation upon entering an edit page, and end it when the user clicks Ok/Cancel. I find I normally use begin rather join.

          • 2. Re: Basic questions about conversations

            Thanks for the reply.
            If you use @Begin without join don't you get IllegalStateException if a user navigates back (the browser back button) and enters the same page?