In this chapter, we'll see how you can build a tree from first principles with a minimal of code. We'll also discuss the unique data structure that is used to populate the tree, and the way in which clever use of that data can let you harness important configuration options. The Ext JS tree natively supports advanced features such as sorting, and drag-and-drop, so we'll be discussing those as well. But if you need a truly bespoke tree, we'll also explore the way in which configuration options, methods, and events can be overridden or augmented to provide it.
The tree itself is created via the Ext.tree.TreePanel
class, which in turn contains many Ext.tree.TreeNodes
classes. These two classes are the core of the Ext JS tree support, and as such will be the main topics of discussion throughout this chapter. However there are a number of other relevant classes that we'll also cover. Here's the full list from the Ext.tree
package:
|