making Tree in EXT2 without Store
Thursday, January 10th, 2008here is how we can add a tree in EXT2 without store (data store)
Ext.BLANK_IMAGE_URL=”../ext2/resources/images/default/s.gif”;
Ext.onReady(makeMenu);
function makeMenu()
{
rootNode=new Ext.tree.TreeNode({text:”ERP Menus”});
rootNode.appendChild([
new Ext.tree.TreeNode({text:”User operation”,allowChildren:true}),
new Ext.tree.TreeNode({text:”Roles”}),
new Ext.tree.TreeNode({text:”Priviliges”}),
new Ext.tree.TreeNode({text:”Vouchers”}),
new Ext.tree.TreeNode({text:”Vouchers”}),
new Ext.tree.TreeNode({text:”Vouchers”}),
new Ext.tree.TreeNode({text:”Vouchers”}),
new Ext.tree.TreeNode({text:”Vouchers”})
]);
menuTree=new Ext.tree.TreePanel({
root:rootNode,
expandable:true,
leaf:false,
lines:true,
animate:true
});
menuTree.expand();
menuTree.render(”menuTreePane”);
}