-
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.
-
Ext User
-
Ext User
Nothing changed again.Puuf
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us