O'Reilly logo

Ext JS 6 By Example by Anand Dayalan

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

Store

A store represents a collection of instances of the model and proxies used to get the data. The store also defines collection operations, such as sorting, filtering, and so on. It is defined by extending the Ext.data.Store class.

Usually, when you define a store, you need to specify a proxy in the store. This is a configuration that tells the store how to read and write the data. We'll see more details on this and look at the different kinds of proxies in the upcoming sections of this chapter.

The following is an example of a store that uses the RESTful API request to load the data in the JSON format:

var myStore = Ext.create('Ext.data.Store', { model: 'Employee', storeId: 'mystore', proxy: { type: 'rest', url: '/employee', reader: { type: ...

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