6 Replies Latest reply on Oct 12, 2007 4:20 PM by pmuir

    Noob conversation confusion

    nickarls

      Hi,

      Is there a way of ending a conversation and starting another at the same time? I have a case that looks like the hotel booking example where I have a page scoped list of orders and then selecting an order @Begin:s a long running conversation.

      The problem is that I can't start a fresh conversation when selecting another order. I either have to join the existing (and manually refreshing all lists etc. that are order-specific) or nest it (which isn't really natural, haven't even tried it).

      I tried ending and then starting the conversations through the API but still no go (@End and @Begin on the same method didn't seem to work, either). The conversations are "parallell", when you select another order the order-specific lists should be null and go through the normal factories).

      Also in pages.xml I have

      <page view-id="/login.xhtml">
       <navigation>
       <rule if="#{identity.loggedIn}">
       <begin-conversation/>
       <redirect view-id="/order.xhtml"/>
       </rule>
       </navigation>
      </page>
      


      So I thought I would enter the application in a new long running conversation but that doesn't seem to be the case. And the "order" object showing in the view hasn't gone through the @Factory("order") I have in my backing bean either.

      There seems to be a learning curve with Seam (as with most things) but I think it will be worth the while to hang in there...

      Thankful for any assistance/theories on the issues,
      -Nik

        • 1. Re: Noob conversation confusion
          pmuir

          You can try the beforeRedirect option on end-conversation.

          • 2. Re: Noob conversation confusion
            pmuir

            Or try propagation=none link

            • 3. Re: Noob conversation confusion
              nickarls

              Removed the

              join=true
              from my method and added the
              propagation="none"
              on my
              s:link
              but it still wants to propagate?

              At least it complains that a long-running conversation is already present. And if I put the
              join=true
              back then it just continues in the current conversation :-/

              • 4. Re: Noob conversation confusion
                zhyuhong

                Have you resolved this issue? I am having exactly the situation.

                I don't want to join the existing conversation, I need to discard the old one and start a new one.

                • 5. Re: Noob conversation confusion
                  gus888

                  Hi,

                  I have been struggling on this issue for a long time. From Seam 2.0, I can create multiple conversations for the same bean, e.g. click @Begin method to create a new conversation id=1, then click page back and click @Begin again, another new conversation id=3 was created, ... (before Seam 2.0, if I do the same operation above, I will get an exception of needing @Begin (join=true)). However, in Seam 2.0, if I click @Begin to start a conversation from a bean("bean1"), then when I try to click @Begin to start another conversation from a different bean("bean2"), I still get an exception of needing @Begin(join=true), but I don't want to join the two conversations. It was said that system only allow one front conversation, but how to switch a front conversation to back, and start a new front conversation? I never got it successful. Thanks in advance for a help on this issue.

                  • 6. Re: Noob conversation confusion
                    pmuir

                    propagation="none" on s:link. Yes - a maximum of one active conversation.