PDA

View Full Version : TreePanel load more than one



orhant
23 Jan 2007, 5:01 AM
Hi

I have below code . Everythings works.But if i click node more than one, it loads two time.and shown same node twice.

How can I stop loading more than one for same root.

Thanks.

var tree = new Tree.TreePanel(viewEl, {
animate:true,
loader: new Tree.TreeLoader({dataUrl:'get-nodes3.php'}),
enableDD:true,
containerScroll: true,
enableDD:true,
containerScroll: true,
ddGroup: 'organizerDD',
rootVisible:true,expanded:true
});

var root = new Tree.AsyncTreeNode({
text: 'ANA MENU',
draggable:true,
id:'0'
});
tree.setRootNode(root);
tree.render();root.expand();
tree.on('click', this.shownewtree,this);

tryanDLS
23 Jan 2007, 8:02 AM
Take a look at some of the other Tree threads. I thought somebody asked this and Jack put in something to disalllow reapeated nodes - or suggested how to do it.

jbraband
23 Jan 2007, 10:21 AM
sure did.

orhant, take a look at http://www.yui-ext.com/forum/viewtopic.php?t=2226

-j

orhant
23 Jan 2007, 1:01 PM
Thanks for help.