2 Replies Latest reply on Aug 17, 2012 10:28 AM by lincolnthree

    no cid in URL when start a conversation - so it ends badly [prettyfaces/weld]


      Is this a know problem and is there a workround?



      Cross post:





      After much ferkeling I have found a workaround:

      Using the eclipse debugger finding the current conversation id... (break on the "init" method and look at the local variable for conversation)

      e.g. if conversation is 2


      add the string "?cid=2" to the end of the URL (initially http://localhost:8080/X/users/manage):


      now refresh the page and pretty much all calls after this will have the conversation.

      the ?cid=2 seems to be correctly sent through when required from the first creation of the conversation.

      So its either

      Weld, majorra, or prettyfaces that have the bug in that they are not adding the correct ?cid=x to the initial URL.

      I will start with the Weld Forum.


        • 1. Re: no cid in URL when start a conversation - so it ends badly [prettyfaces/weld]




          Force (brutually) PrettyFaces to include the cid:


                    <url-mapping id="manageUsers">

                              <pattern value="/users/manage"></pattern>


                              <query-param name="cid">#{userManagementController.cid}</query-param>




                    <url-mapping id="createUser">

                              <pattern value="/users/create"></pattern>


                              <query-param name="cid">#{userCreationController.cid}</query-param>





          In the controller:





               * Hack to pass cid to prettyfaces so it can add it to URL

               * DONT remove.


              public String getCid() {

                  return this.conversation.getId();


              public void setCid(String cid) {









          Not pretty but it works.








          oddly; myeclipse validator does not like the line




          <query-param name="cid">#{userManagementController.cid}</query-param>

          • 2. Re: no cid in URL when start a conversation - so it ends badly [prettyfaces/weld]

            Nice workaround!