Results 1 to 2 of 2

Thread: Expand tree after AsyncTreeNode.reload();

  1. #1

    Default Expand tree after AsyncTreeNode.reload();

    I got

    Code:
    Tree = Ext.tree;
       tree = new Tree.TreePanel({
        border: false,
        autoScroll: true,
        containerScroll: true,
        //enableDD: true,
        //enableDrag: true,
        //enableDrop: true,
        rootVisible: true,
        loader: new Tree.TreeLoader({
         dataUrl: 'index.php/cms/' + model_url
        })
       });
     
       var root = new Tree.AsyncTreeNode({
        text: 'start',
        element: false
       });
       tree.setRootNode(root);
       root.expand(true, false);
    where root.expand(true, false); line is responsible to expand tree after load. now i open a document, making change in a title and clicking SUBMIT. After sucessfull db update i got

    Code:
    success: function() {
        structure_tree.root.reload();
       },
    where how You see above i call AsyncTreeNode.reload();

    QUESTION:
    What should i do to get everything expanded (all nodes), because after reload() elements (nodes) are collapsed.

  2. #2

    Default

    [SOLVED]
    I simply added a line

    success: function() {
    structure_tree.root.reload();
    structure_tree.root.expand(true, false);
    },

    I was thinking (because i work in AS3.0 (adobe flash) that i have to wait to reload... for my luck - i dont have to

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •