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 remotely-loaded JSON data easier. JsonStore is pre-configured with a built-in Ext.data.HttpProxy and Ext.data.JsonReader. If you require some other proxy/reader combination then you'll have to create a basic Ext.data.Store configured as needed.
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 by this object's JsonReader. Either this option, or the url option must be specified.
JsonStore
  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
  fields : Ext.util.MixedCollection
A MixedCollection containing the defined Fields for the Records stored in this Store. Read-only.
Store

Public Methods

Method Defined By

Public Events

Event Defined By