1

I'm trying to move nodes form a tree to another and be able to reparent nodes and so on. In order to get the track the drop event on a node in a tree I have registered a FolderDropHandler pn the tree:

tree.addFolderDropHandler(new FolderDropHandler() {
            @Override
            public void onFolderDrop(FolderDropEvent folderDropEvent) {
                TreeNode parentFolder = folderDropEvent.getFolder();
                TreeNode droppedItem =  folderDropEvent.getNodes()[0];

            }
        });

This works fine, I'm notified when nodes are dropped on other nodes, but I am not notified when I drop on the root node (or an empty tree with just the root node). How can i handle this case? Any ideas?

4

0 回答 0