This FAQ is most relevant to Ext JS, any version.
This article is currently due for review
We suspect that this article may be out-of-date or contain incorrect information.
But we are constantly editing articles, so we promise we will get to this one soon.
Specificing tree node icons
A Tree Node with no children is a leaf node. If you want a node to always have a certain icon, use the iconCls attribute to give it a class name eg:
myNode.appendChild(new Ext.tree.AsyncTreeNode({ text: "A folder", iconCls: "folder" });
Then specify appropriate CSS rules, eg:
.x-tree-node img.folder, .x-tree-node-collapsed img.folder{ background: url("../images/default/tree/folder.gif"); } .x-tree-node-expanded img.folder { background: url("../images/default/tree/folder-open.gif"); }
How to remove a child
tree.selModel.selNode.parentNode.removeChild(node);

2 Comments
NotImportant
2 years agohmmm there are only 10 Lines of FAQ???
Jon Cook
2 years agoAlso there is no class: Ext.tree.AsyncTreeNode
http://docs.sencha.com/ext-js/4-0/#
Leave a comment:
Commenting is not available in this channel entry.