PDA

View Full Version : Issue with TreePanel new clone node



varun333
13 Mar 2012, 1:20 AM
Hi,
I am having 2 tree panels and i am moving node from source tree to destination tree. In this process i don;t want to move the node from the source tree so i used the clone mechanism to keep the node in source tree.
this is working fine, but the issue is the onclick event not gets fired for the new cloned node in Tree panel.
this is the method which creates the clone node. Any suggestion on this please ?


beforeremove : function( tree, parent, node )
{

var n = node; // the node that was dropped
var copy = new Ext.tree.TreeNode(Ext.apply({},node.attributes));
var originalIndex = parent.indexOf(n);
var nextNodeIndex = originalIndex + 1;
var nextNode = parent.item(nextNodeIndex);
if(nextNode == undefined)
{
parent.appendChild(copy);

}
else
{
parent.insertBefore(copy,nextNode);

}

}

mitchellsimoens
13 Mar 2012, 6:00 AM
Moved to Ext JS 3 Help forum.

varun333
14 Mar 2012, 1:58 AM
can someone help on this please ?