3 * @class Ext.data.ArrayStore
4 * @extends Ext.data.Store
7 * <p>Small helper class to make creating {@link Ext.data.Store}s from Array data easier.
8 * An ArrayStore will be automatically configured with a {@link Ext.data.reader.Array}.</p>
10 * <p>A store configuration would be something like:</p>
12 var store = new Ext.data.ArrayStore({
20 {name: 'price', type: 'float'},
21 {name: 'change', type: 'float'},
22 {name: 'pctChange', type: 'float'},
23 {name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
27 * <p>This store is configured to consume a returned object of the form:
30 ['3m Co',71.72,0.02,0.03,'9/1 12:00am'],
31 ['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am'],
32 ['Boeing Co.',75.43,0.53,0.71,'9/1 12:00am'],
33 ['Hewlett-Packard Co.',36.53,-0.03,-0.08,'9/1 12:00am'],
34 ['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am']
38 * <p>An object literal of this form could also be used as the {@link #data} config option.</p>
40 * <p><b>*Note:</b> Although not listed here, this class accepts all of the configuration options of
41 * <b>{@link Ext.data.reader.Array ArrayReader}</b>.</p>
44 * @param {Object} config
47 Ext.define('Ext.data.ArrayStore', {
48 extend: 'Ext.data.Store',
50 uses: ['Ext.data.reader.Array'],
53 * @cfg {Ext.data.DataReader} reader @hide
55 constructor: function(config) {
56 config = config || {};
65 this.callParent([config]);
68 loadData: function(data, append) {
69 if (this.expandData === true) {
75 r[r.length] = [data[i]];
81 this.callParent([data, append]);
85 Ext.data.SimpleStore = Ext.data.ArrayStore;
86 // Ext.reg('simplestore', Ext.data.SimpleStore);