8 Replies Latest reply on May 5, 2008 8:56 AM by cmoraes

    Potential bug in combination tree/drag

      Hi folks,

      currently we have the following problem with rich:tree and rich:dragSupport:

      You can only drag something from a tree node when it is the first child of it's parent. This worked before - precisly spoken:

      - RF 3.1.4 GA: OK
      - RF 3.2.0 (Snapshot from January 17th): BROKEN
      - RF 3.2.0 (Snapshot from January 25th): BROKEN

      Currently there is no later snapshot available here:
      http://snapshots.jboss.org/maven2/org/richfaces/ui/richfaces-ui/3.2.0-SNAPSHOT/

      My environment: JSF 1.2, Tomcat 5.5, Facelets.

      Code:

      <h:form>
       <rich:tree value="#{mainBean.treeData}" var="item"
       nodeFace="#{item.type}" showConnectingLines="true"
       switchType="ajax">
      
       <rich:treeNode type="FolderNode">
       <h:outputText value="#{item.name}" />
       </rich:treeNode>
      
       <rich:treeNode type="ObjectNode">
       <a4j:outputPanel>
       <h:outputText value="#{item.name}" />
      
       <rich:dragSupport dragIndicator=":indicator"
       dragType="objectDragged" dragValue="#{item}" >
       <rich:dndParam name="label" value="#{item.name}" />
       </rich:dragSupport>
      
       </a4j:outputPanel>
       </rich:treeNode>
      
       </rich:tree>
       </h:form>
      
      


      Further remarks:
      -> My Backing Data has one node with Type "FolderNode" and as children of this three nodes with Type "ObjectNode".
      -> Bug appears only from 2nd hierarchy level. Concerning this example: When you omit the FolderNode it works.
      -> When you omit the a4j:outputPanel the first node is also not draggable. Who can explane this to me?

        • 1. Re: Potential bug in combination tree/drag

          Can anybody reproduce this?

          Or is it an already known bug? Can't find it in JIRA...

          • 2. Re: Potential bug in combination tree/drag

            Sorry, I forgot the possibility to use built-in drag and drop in rich:tree...

            This is working well for all mentioned versions. So I have only two short questions:

            1.) Is it only recommended to use built-in drag and drop or is it not supported anymore to use rich:tree and rich:dragSupport together. In the 1st case this is a bug report to - only with minor priority.

            2.) When there are new snapshots available?

            Greetings,
            F. Marwede

            • 3. Re: Potential bug in combination tree/drag

              Still waiting for an answer.

              AND: I have to correct my last post. Also with built in drag support in tree there are problems in the two 3.2.0 snapshots:

              - After the first drag&drop the first node is replaced by a copy of the last (crazy thing).

              - After the first drag&drop it is not possible anymore to drag & drop the first node.

               <h:form>
               <rich:tree value="#{mainBean.treeData}" var="item" nodeFace="#{item.type}" showConnectingLines="true"
               switchType="ajax" dragIndicator=":indicator">
              
               <rich:treeNode type="ToolBoxFolder">
               <h:outputText value="#{item.name}" />
               </rich:treeNode>
              
               <rich:treeNode type="NeoClassNode" dragType="objectDragged">
               <h:outputText value="#{item.name}" />
               <rich:dndParam name="label" value="#{item.name}" />
               </rich:treeNode>
              
               </rich:tree>
               <rich:panel style="height:200px;width:200px">
               <rich:dropSupport acceptedTypes="objectDragged" />
               </rich:panel>
               </h:form>
              


              AND: with contextmenu in tree the same thing happens:

              - After the first drag&drop the first node is replaced by a copy of the last (crazy thing).

              - After the first drag&drop it is not possible anymore to open the context menu of the first node.

              Forgot to mention: Using FF 2. I have not tested yet other browsers to test if it is a browser specific bug.


              • 4. Re: Potential bug in combination tree/drag

                up...

                • 5. Re: Potential bug in combination tree/drag

                  I have experienced the same problem

                  • 6. Re: Potential bug in combination tree/drag

                    So we are two. Anyone else?

                    • 7. Re: Potential bug in combination tree/drag

                      Hmm...seems to be fixed with the new snapshot. Perhaps this is the reason for the RF Team for not caring about this forum thread ;-)

                      @RichUserOne: It is fixed for you too?

                      • 8. Re: Potential bug in combination tree/drag
                        cmoraes

                        Hi,

                        I have submited a bug warning in JIRA about this issue. That is the actual state:

                        Key: RF-2996
                        URL: http://jira.jboss.com/jira/browse/RF-2996
                        Project: RichFaces
                        Issue Type: Bug
                        Affects Versions: 3.2.0
                        Environment: WinXP; Tomcat 6.0.16; JSF 1.2 (mojarra 1.2_08); JDK 1.6.0_04
                        Reporter: Cristiano Moraes
                        Assigned To: Nick Belaevski
                        Fix For: Future