PDA

View Full Version : Ext.dd.DropTarget.notifyDrop not be called.



jim83
1 Jul 2008, 8:50 AM
Hi All,
I have a question for drag drop funciton in Ext. Here is my code:


var Tree = Ext.tree;
loader = new Tree.TreeLoader({dataUrl: "/action1/functions"});

var root = new Tree.AsyncTreeNode({
text: 'Functions',
draggable:false,
id:'source'
});

var tree = new Tree.TreePanel({
animate: true,
containerScroll: true,
ddGroup: 'treeDD',
enableDrag: true,
loader: loader,
renderTo: 'edit_panel_functions_list',
root: root
});

new Tree.TreeSorter(tree, {folderSort:true});

dt = new Ext.dd.DropTarget('code',{
ddGroup:'treeDD'
});

dt.notifyDrop = function(src,e,data) {
return true;
}
When drap a element in the tree to the target, notifyDrop function is not called. Are there any possible problme which related to this issue? Anybody can provide any idea would be greate appreciated.

Thanks in advance!
jim

jim83
1 Jul 2008, 10:16 AM
I have found where the problem is.

It seems that all notifiication will send to the notifyDrop function of one global variable of Ext.dd.DropTarget even it has different ddGroup value to others. So, the notifyDrop functions of other variable of Ext.dd.DropTarget never be called.

Is it the desired behavior?

Thanks,
Jim