2 Replies Latest reply on Jul 9, 2008 12:26 AM by francof

    Is my conversationId correct ?

      I thought I had my first complete use case in Seam working.

      But looking at my conversationId on my debug page led to some doubts.

      In my edit.page.xml I have

      `   <begin-conversation join="true"/>
         <description>Edit Burst: #{burstHome.instance.burstName}</description>
        
         <action execute="#{burstHome.wire}"/>
        
         <param name="burstFrom"/>
         <param name="burstBurstId" value="#{burstHome.burstBurstId}"/>
         <param name="userFrom"/>
         <param name="userUserId" value="#{userHome.userUserId}"/>

         <navigation from-action="#{burstHome.persist}">
             <end-conversation/>
             <redirect view-id="/BurstList.xhtml"/>
         </navigation>
        
         <navigation from-action="#{burstHome.update}">
             <end-conversation/>
             <redirect view-id="/BurstList.xhtml"/>
         </navigation>
        
         <navigation from-action="#{burstHome.remove}">
             <end-conversation/>
             <redirect view-id="/BurstList.xhtml"/>
         </navigation>
      `


      So I join a long-running conversation when I get to my edit page and end the conversation on my way back to list page.

      This is what I see in my execution

      http://localhost:8080/seamtest/BurstList.seam?cid=26
      http://localhost:8080/seamtest/BurstEdit.seam?burstBurstId=1&cid=26

      But when I look at the debug page
      http://localhost:8080/seamtest/debug.seam

      my conversationid is 27 - *I was expecting it to be 26 am I wrong ?*

      Every time I get to the edit page, the conversationId in the URL does not match that in the URL of the edit page. The conversationId is usually 1 or 2 higher.


      My code does work as expected, but this is confusing to me.

      Thanks in advance for any responses.
        • 1. Re: Is my conversationId correct ?
          dan.j.allen

          The conversation id in the URL is the conversation that is being restored. The actual conversation may different if that conversation was temporary or destroyed at the start of the request. In that case, a new conversation is created internally, which is reflected in the links rendered on the page. This is just part of how the HTTP request exchange works. The request URL doesn't necessary reflect the state on the server after the response is returned.

          • 2. Re: Is my conversationId correct ?

            Ok, got it!


            I really appreciate you taking the time to respond.


            Thanks


            Franco