Hi, to everyone! It's my first post and first of all i want to greet
all the gwt-ext community which
now i belong.
My problem is that i'm trying to drag and drop an entire tree (and
this is auto-magically)
but i need not to move it but to copy it.
I tried the source of the showcase but copies only a node and not all
its childs.
I hope there is a solution for my problem because, as usual, it's very
urgent
and on this friday i have a demonstration to the (possible) client.
Thanks in advance,
Patrizio

----------------------

I tried with this code (the code of the showcase).
The strange thing is that copyNode is a single node without childs,
so seems that cloning clones only the tree root but not its childs and
so
the for it's unuseful.

public boolean doBeforeNodeDrop(TreePanel treePanel, TreeNode target,
                        DragData dragData, String point, DragDrop source,
                        TreeNode dropNode, DropNodeCallback dropNodeCallback) {

                        TreeNode copyNode = dropNode.cloneNode();
                        Node[] children = copyNode.getChildNodes();
                        for (int i = 0; i < children.length; i++) {
                                Node child = children[i];
                               copyNode.removeChild(child);
                        }
                        dropNodeCallback.setDropNode(copyNode);

                return true;
        }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to