How to get the Ext Tree childNodes' id?
I make a Ext tree开发者_如何学Go ,every node contains a checked,every node has a "checkchange" listeners. If I choose a node ,how to make all its childNodes' checked selection to true? And how can I get all child leafNodes' id ?
oncheckchange = function(node, checked, options) {
node.cascadeBy(function(n) {
alert(n.get('id')); // gives the child node's Id
n.set('checked', checked);
});
};
tree.on('checkchange', oncheckchange, null);
In pure Ext you should just be able to do node.id, or node.attributes.id (I forget which) to get the node's ID. In terms of children then it's node.childNodes[*].id etc.
精彩评论