4 Replies Latest reply on Jan 17, 2010 12:38 AM by jgurda

    How can I pass a conversation ID into an a:commandButton?

    alringer

      I have the need for an AJAX command button so that I can call some javascript as well as reRender a table of results. The results each have an s:link in them such that I can propagate the conversation. Unfortunately, the CID is being bumped up when I hit the commandButton.


      Does any one know how to pass the current conversation ID to propagate into the a:commandButton?

        • 1. Re: How can I pass a conversation ID into an a:commandButton?
          gjeudy

          Have you tried this ?


          <a4j:commandButton><s:conversationPropagation type="join" /></a4j:commandButton>

          • 2. Re: How can I pass a conversation ID into an a:commandButton?
            alringer
            Just tried that but no luck.Here is my code...

            <a:commandButton id="brokerSearch"
                              value="Search for Brokers"
                              action="#{signup.findBrokers}"
                              ajaxSingle="true"
                              reRender="results"
                              data = "#{signup.brokerInfoList}"
                              oncomplete="createBrokerMarkers(data)">
                              <f:param value="#{accountId}" name="accountId"/>
                              <s:conversationPropagation type="join" />
            </a:commandButton>
            • 3. Re: How can I pass a conversation ID into an a:commandButton?
              rogermori1

              Hi Mark:
              What exactly do you want to achieve?.


              To join to the current conversation by using an a:commandButton, or to have the conversation Id on the re rendered region as part of the s:link.


              Also, show the code for results and createBrokerMarkers(data).


              Roger.

              • 4. Re: How can I pass a conversation ID into an a:commandButton?
                jgurda

                Hi Guys:


                I had some problems with a:commandButton and s:conversationPropagation too and i used something like this:


                <a:commandButton value="#{messages['commons.add']}"
                    reRender="negativeFeatures"
                    action="#{opinionAdding.addNegativeFeatureProposal}">
                    <f:param name="conversationPropagation" value="join"/>
                </a:commandButton>
                



                This code does exacly what a:commandButton with s:conversationPropagation


                Regards,


                Jan