12 Replies Latest reply on Apr 11, 2007 9:44 AM by asaf sh

    Tree with DnD support

    asaf sh Expert

      Hi,

      I have a tree which looks like:

      <rich:tree switchType="ajax" style="width:180px" value="#{rolesFoldersTree.data}" var="item" nodeFace="#{item.type}" dragIndicator=":indicator">
       ..
       <rich:treeNode type="role" dragType="role" dragValue="#{item}">
       <h:outputText value="#{item.name}" />
       </rich:treeNode>
      </rich:tree>
      


      And a dropSupport tag as follows:
      <rich:dropSupport id="dndTest" acceptedTypes="role" dropValue="Role!" dropListener="#{um.flagedByDragAndDrop}">
      </rich:dropSupport>
      


      And the dropListener method which looks like:
      public void flagedByDragAndDrop(DropEvent event) {
       System.out.println("---------" + event.getDragValue() + "---------");
      }
      


      As it seems,after dragging, 'event.getDragValue()' always returns null,

      Shouldn't the drag value has to be equal to the 'dragValue' parameter in the 'treeNode' tag?


      As always, many thanks,

      Asaf.