4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
13 * @class Roo.data.SimpleStore
14 * @extends Roo.data.Store
15 * Small helper class to make creating Stores from Array data easier.
16 * @cfg {Number} id The array index of the record id. Leave blank to auto generate ids.
17 * @cfg {Array} fields An array of field definition objects, or field name strings.
18 * @cfg {Object} an existing reader (eg. copied from another store)
19 * @cfg {Array} data The multi-dimensional array of data
20 * @cfg {Roo.data.DataProxy} proxy [not-required]
21 * @cfg {Roo.data.Reader} reader [not-required]
23 * @param {Object} config
25 Roo.data.SimpleStore = function(config)
27 Roo.data.SimpleStore.superclass.constructor.call(this, {
29 reader: typeof(config.reader) != 'undefined' ? config.reader : new Roo.data.ArrayReader({
32 Roo.data.Record.create(config.fields)
34 proxy : new Roo.data.MemoryProxy(config.data)
38 Roo.extend(Roo.data.SimpleStore, Roo.data.Store);