1 Reply Latest reply on Nov 23, 2007 11:38 AM by Pankaj Ghosh

    Richfaces Tree: Drop Listener not being called!!!

    Pankaj Ghosh Newbie

      Hi all,

      I am trying to use the inbuilt drag-drop feature of richfaces:tree
      Though the drag-drop indicater works fine, the drop listener is not being called.
      Following is the code I am using:

      <rich:dragIndicator id="indicator" />
      <rich:tree switchType="client" value="#{platformDocumentTree}" var="item" nodeFace="#{item.type}">
      <rich:treeNode type="folder" reRender="#{platformDocumentTree}" acceptedTypes="document" dropValue="DroppedFolder" dropListener="#{DragDrop.processDrop}"></rich:treeNode>
      <rich:treeNode type="document" icon="/img/document.gif" dragIndicator="indicator" dragType="document" dragValue="DraggedDocument"></rich:treeNode></rich:tree>

      There are a few jsf commandButtons and OutputText, for each treeNode, which I have skipped in the above code.

      Following is the code for dropListener:
      public class DragDropListenerAction implements DragDropListener, org.richfaces.event.DropListener {
       public void processDrop(DropEvent dropEvent) {
       System.out.println("DROP EVENTLISTENER CALLED");
       System.out.println("DRAG ID"+dropEvent.getDragValue());
       System.out.println("DROP ID"+dropEvent.getDropValue());

      Is there something I am missing?
      There seems to be no examples/queries on this topic.

      Any help will be appreciated on this.