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>
@Name("DragDrop")
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());
}
}Hi,
Have resolved this issue myself. The above code is working fine.
It wasnt working due to a modelpanel embedded in the tab.