O'Reilly logo

Learning Ext JS - Fourth Edition by Armando Gonzalez, Crysfel Villa, Carlos A. Méndez

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 (Ext.data.TreeStore) is a special store in the Ext JS library. It is designed especially for working with the tree structure, which is Ext.tree.Panel in this case. As this class extends Ext.data.Store which in turn sequentially extends Ext.data.AbstractStore, you will notice that the behavior is similar to Ext.data.Store.

When we define our stores, we need to specify a data model. In this case (TreeStore), if we don't specify a model, then Ext JS will create an implicit data model using the Ext.data.NodeInterface class, which will lead to creating a model for our store.

Let's see an example of loading data from the server into our Ext.data.TreeStore class:

Ext.onReady(function(){ Ext.tip.QuickTipManager.init(); //Store ...

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