Properties Methods Events Config Options Direct Link
Observable
  Store
    JsonStore

Class Ext.data.JsonStore

Package:Ext.data
Defined In:JsonStore.js
Class:JsonStore
Extends:Store
Small helper class to make creating Stores for JSON data easier.
var store = new Ext.data.JsonStore({
    url: 'get-images.php',
    root: 'images',
    fields: ['name', 'url', {name:'size', type: 'float'}, {name:'lastmod', type:'date'}]
});
This would consume a returned object of the form:
{
    images: [
        {name: 'Image one', url:'/GetImage.php?id=1', size:46.5, lastmod: new Date(2007, 10, 29)},
        {name: 'Image Two', url:'/GetImage.php?id=2', size:43.2, lastmod: new Date(2007, 10, 30)}
    ]
}
An object literal of this form could also be used as the data config option. Note: Although they are not listed, this class inherits all of the config options of Store, JsonReader.

Config Options

Config Options Defined By
  autoLoad : Boolean/Object
If passed, this store's load method is automatically called after creation with the autoLoad object
Store
  baseParams : Object
An object containing properties which are to be sent as parameters on any HTTP request
Store
  data : Object
A data object readable this object's JsonReader. Either this option, or the url option must be specified.
JsonStore
  proxy : Ext.data.DataProxy
The Proxy object which provides access to a data object.
Store
  sortInfo : Object
A config object in the format: {field: "fieldName", direction: "ASC|DESC"}
Store
  storeId : String
If passed, the id to use to register with the StoreMgr
Store
  url : String
The URL from which to load data through an HttpProxy. Either this option, or the data option must be specified.
JsonStore

Public Properties

Property Defined By
  baseParams : Object
An object containing properties which are used as parameters on any HTTP request.
Store

Public Methods

Method Defined By

Public Events

Event Defined By