O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The TreeStore

The TreeStore is a store implementation designed for the Ext.tree.Panel component. It provides methods for loading nodes, and it has the ability to use the hierarchical tree structure combined with the store capabilities. The Ext.data.TreeStore class is a subclass of the Ext.data.AbstractStore class, that's why it behaves very similar to other stores.

When we define our Ext.data.TreeStore class we need to specify a model, but if no model is specified, an implicit model will be created. This model will then be the main model for our tree panel. For the tree to read the nested data, we need to apply a set of data in a tree format as shown in the previous example.

Let's see an example of an Ext.tree.Panel component with an Ext.data.TreeStore ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required