PDA

View Full Version : Unable to set the child after setting another child in a tree



Josan84
29 Sep 2015, 12:15 AM
Hello,

I have a problem when I try to set a child after setting another child in a tree. It seems is working well in Javascript, but then I only can see the first child added to the tree.

What's the problem? I show the code ..
Btw, I'm using Ext JS 3.4 ...

Thanks,
Josan84



var rootNode= tree.getRootNode();

rootNode.appendChild({ id: node.parentNode.id,
text: node.parentNode.text,
leaf: false
});

var nodeAux = tree.getNodeById(node.parentNode.id);

nodeAux.appendChild({
id: node.id,
text: node.text,
leaf: true
});

Gary Schlosberg
30 Sep 2015, 4:40 PM
Are you able to recreate this issue in a test case?
https://fiddle.sencha.com/#home

Josan84
1 Oct 2015, 1:54 AM
Thanks, but I'm not lucky...