ExtJs: Tree: how download then select using AJAX calls ?

Posted by Olivier Pons on Stack Overflow See other posts from Stack Overflow or by Olivier Pons
Published on 2010-01-10T11:06:16Z Indexed on 2010/03/18 2:01 UTC
Read the original article Hit count: 450

Filed under:
|
|
|

Hi,

Here's my goal : - open a tree - download the root nodes - expand automatically one specific node using AJAX (and loop n times here) until i find a leaf then select the leaf

Here's the function that works when I declare the Tree :

        listeners: {
            load: function(n) {
                console.log('load(n)');
                n.eachChild(
                    function(n) {
                        if ((n.id=='lys/2007') ||
                            (n.id=='lys/2007/08') ||
                            (n.id=='lys/2007/08/29')) {
                            n.expand(false,false);
                        }
                    });
            }
        }

But if I don't know how to make it more "generic" (almost exactly like the ExtJs documentation). But they don't jump automatically to a specific node (i.e. I want no user interaction).

Any idea / advice how to do this?

Don't hesitate to edit my post to make it proper English :)

© Stack Overflow or respective owner

Related posts about extjs

Related posts about tree