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

    Tree with DnD support

    asaf sh Expert


      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}" />

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

      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,