1. #11
    Ext User
    Join Date
    Sep 2008
    Posts
    1
    Vote Rating
    0
    samuellopez is on a distinguished road

      0  

    Thumbs up


    This is a good example and it's working:

    The following is the js file "tree.js":

    var Tree = Ext.tree;

    var tree = new Tree.TreePanel({
    el:'tree-div',
    useArrows:true,
    autoScroll:true,
    animate:true,
    layout: 'fit',
    enableDD:true,
    border: false,
    rootVisible: true,
    singleExpand: true,
    containerScroll: true,
    loader: new Tree.TreeLoader({
    dataUrl:'tree.cfm'
    })
    });

    // set the root node
    var root = new Tree.AsyncTreeNode({
    text: 'Ext JS',
    draggable:false
    });
    tree.setRootNode(root);

    // render the tree
    tree.render();
    root.expand();

    And the following is the json file, make sure it's in the same direcoty:

    [{"text":"widgets","id":""},
    {"text":"debug.js","id":"","leaf":true},
    {"text":"file.js","id":"","leaf":true},
    {"text":"state","id":""},
    {"text":"core","id":""},
    {"text":"legacy","id":""},
    {"text":"dd","id":""},
    {"text":"ext.jsb","id":"" ,"leaf":true}]

    Hope this made your life much easier.

  2. #12
    Ext User twinkle's Avatar
    Join Date
    Aug 2008
    Location
    Ankara,Turkey
    Posts
    50
    Vote Rating
    0
    twinkle is on a distinguished road

      0  

    Default


    Thanks I will try.

  3. #13
    Ext User twinkle's Avatar
    Join Date
    Aug 2008
    Location
    Ankara,Turkey
    Posts
    50
    Vote Rating
    0
    twinkle is on a distinguished road

      0  

    Default


    Nothing changed again.Puuf

Thread Participants: 2