1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    2
    Vote Rating
    0
    jiucenglou is on a distinguished road

      0  

    Default How-to:find tree node of depth >= 2 by id? the "getNodeById doesn't work"

    How-to:find tree node of depth >= 2 by id? the "getNodeById doesn't work"


    Hi all,
    Suppose there exists a tree structure like this:
    root
    |----child1
    | |-----child1.1
    | |-----child1.2
    |----child2

    ===code begins
    ...
    root.expand(true,false, function(){
    ...
    tree.getNodeById(theIdOfChild1) // this method can return child1 node correctly
    ...
    tree.getNodeById(theIdOfChild1.1) // this method return undefined
    ...
    });
    ===code ends

    After looking at the api, I found that it is because the root.expand call back function will be called immediately after the root itself expand, ignoring the child nodes and sub trees.
    My question is, is there any way to call a function right after the whole tree structure is expanded?
    Take a step further, I know async is quite a highlight for interacting with clients while doing jobs in backend, however, is there any way to be informed when the whole process is finished?

    Thanks in advance!
    Last edited by jiucenglou; 10 Jul 2007 at 7:05 AM. Reason: clarify the question

  2. #2
    Ext User
    Join Date
    Jul 2007
    Posts
    2
    Vote Rating
    0
    jiucenglou is on a distinguished road

      0  

    Default



    Is there any advice?

    Thanks for any help!

  3. #3
    Ext User
    Join Date
    Jan 2008
    Posts
    3
    Vote Rating
    0
    jpderooy is on a distinguished road

      0  

    Default


    Hi,

    take a look at the CallBackHandler you can provide when expanding the root node. Try something like:

    var CallBackHandler = {success: handleExpand}:

    function handleExpand() {
    //The code in this function is handled after a successful expand of the root node
    }

    root.expand(true,false,CallBackHandler);

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar