0
votes

I make a Ext tree ,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 ?

2
I don't see anything hibernate related, removed the tag.Pascal Thivent

2 Answers

1
votes
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);
0
votes

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.