1 Reply Latest reply on Jul 8, 2006 10:06 AM by norman.richards

    conversationId is missed in the URL

    gfzhang

      I modified the numberGuess sample to simulate the senario of a wizard, that is, click a button to display a new page, but the there is no conversationId parameter displayed in the new page's url.

      I add a button in the numberGuess form:

      <h:commandButton type="submit" value="Interval" action="interval" />
      


      when I click the Interval button, I am confused that:
      (1)No concerrsationId is displayed in the url. I wonder if the conversation is still active.
      (2)I expect the url of the new page to be:
      http://localhost:8080/seam-numberguess/interval.seam?conversationId=2
      

      but it is not. The url displayed is:
      http://localhost:8080/seam-numberguess/numberGuess.seam
      


      The application seems work well.

      When I click the guess button, the displayed url is
      http://localhost:8080/seam-numberguess/numberGuess.seam?conversationId=2
      


      The following is the part of the jPDL file:
       <start-page name="displayGuess" view-id="/numberGuess.jsp">
       ....
       <transition name="interval" to="toInterval" />
       </start-page>
       ...
       <page name="toInterval" view-id="/interval.jsp">
       <transition name="back" to="displayGuess"/>
       </page>
      


      Do I misunderstand something? What wrong with my modification?

      I use Seam 1.0.1 GA.

      Your advice is appreciated. Thanks.


        • 1. Re: conversationId is missed in the URL

          JSF actions use a POST, and the conversation is automatically propagated with that data. The only time time you need the conversationId in the URL is when you do a GET. (if you redirect after a POST, then the redirect filter will add the conversationId for the GET that follows, so that might be why you are thinking you should need it)