Hi guys,
I am trying to set up a TreePanel which every node should be a "folder" cls (it is for a mailbox listing) however only the nodes that actually are not leaves and have children should have the arrow/plus/minus collapse/expand button. My implementation of the tree panel is as follows (it is not fetching nodes asynchronously, they are all loaded when the tree is created):
Code:
var tree = new Ext.tree.TreePanel(
{
useArrows : true,
autoScroll : false,
animate : true,
enableDD : false,
containerScroll : true,
border : false,
rootVisible : false,
loader : new Tree.TreeLoader(),
root : new Tree.AsyncTreeNode(
{
text : 'Root',
id : 0,
expanded : true,
children : [{id:'folder_id', text:'Folder', 'cls':'folder', 'expandable':false}, {...}]
})
});
I thought that setting expandable to true for the nodes with no children would do the trick but it doesnt. And i can't use the "leaf" property set to false, because this changes the node icons, and i need them to be folder icons.