8 Replies Latest reply on Apr 3, 2008 3:01 PM by bsmithjj

    Drag-N-Drop + Conversation

      How do I maintain conversation state while using drag-n-drop? Is this possible or should I just use session scoping?

      Thanks,
      Brad Smith

        • 1. Re: Drag-N-Drop + Conversation

          anybody?

          • 2. Re: Drag-N-Drop + Conversation
            ilya_shaikovsky

            What is your problem while performing this task? share additional info and example if you can please.

            • 3. Re: Drag-N-Drop + Conversation

              My problem is simple, everytime I execute a drag-n-drop using richfaces, a new conversation is started on the server side. I would guess there is probably some way of communicating the conversation ID to JSF, I've even set a hidden input variable in my form to transmit the conversation ID but it's not 'working'.

              I wouldn't ask here, but hey, the relevant info is not in the manual or the live demo.

              Help?

              Thanks,
              Brad Smith

              • 4. Re: Drag-N-Drop + Conversation

                One more thing, in the manual, http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html_single/index.html#dndParam
                , it says:


                6.37. < rich:dndParam >
                6.37.1. Description

                This component is used for passing parameters during drag-and-drop operations.



                The questions here is who gets the parameters? are these request parameters?

                I've tried this:

                <rich:dndParam name="conversationId" value="#{conversation.id}"/>
                

                but that doesn't solve my conversation-state issue...


                • 5. Re: Drag-N-Drop + Conversation
                  nbelaevski

                  rich:dndParam components are aimed to customize drag indicator. Try to use f:param instead.

                  • 6. Re: Drag-N-Drop + Conversation

                    well, I tried f:param

                     <rich:dragSupport dragIndicator="indicator" dragType="availablePivot" dragValue="#{column.column}">
                     <rich:dndParam name="label" value="#{column.label}"/>
                     <f:param name="conversationId" value="#{conversation.id}"/>
                     </rich:dragSupport>
                    
                    


                    and

                     <rich:dropSupport id="pivotCols" dropValue="#{column}" acceptedTypes="availablePivot"
                     dropListener="#{evergreenUserPivotTable.addPivotColumn}"
                     reRender="availablePivotCols,selectedPivotCols,pivottedData">
                     <f:param name="conversationId" value="#{conversation.id}"/>
                     </rich:dropSupport>
                    
                    


                    no luck. A new conversation is generated for each drag-n-drop event.

                    Thanks

                    • 7. Re: Drag-N-Drop + Conversation
                      nbelaevski

                      Can you please check if parameter is submitted? That can be done using Firebug (see Net tab) or similar tool.

                      • 8. Re: Drag-N-Drop + Conversation

                        Immediately after the drop succeeds, I can see this request in firebug:

                        Request Headers
                        Host ntinternetdev.evergreeninsite.com
                        User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
                        Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
                        Accept-Language en-us,en;q=0.5
                        Accept-Encoding gzip,deflate
                        Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
                        Keep-Alive 300
                        Proxy-Connection keep-alive
                        Content-Type application/x-www-form-urlencoded; charset=UTF-8
                        Referer http://ntinternetdev.evergreeninsite.com/component-demo/pivot-table-sample.seam?conversationId=1
                        Content-Length 294
                        Cookie s_pers=%20s_vsn_nytimesglobal_1%3D3430680828709%7C1516889009367%3B%20s_vnum1%3D1206377217627%257C6%7C1521910017627%3B; rsi_segs=; JSESSIONID=5BDF5011ABA6DC9CC2D6F64D02F14B09
                        Pragma no-cache
                        

                        It doesn't look to me like the conversationId parameter is being sent; also, the tags are as stated in my last post on this.

                        Suggestions?
                        Thanks,
                        Brad Smith

                        PS: I'm using 3.2.0.GA now