23 lines
No EOL
1.2 KiB
HTML
23 lines
No EOL
1.2 KiB
HTML
<html><head><title>SimpleStore.js</title><link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/></head><body><h1>SimpleStore.js</h1><pre class="highlighted"><code><i>/**
|
|
* @class Ext.data.SimpleStore
|
|
* @extends Ext.data.Store
|
|
* Smaller help class to make creating Stores from Array data easier.
|
|
* @cfg {Number} id The index <b>in</b> the array that be used <b>for</b> record ids. Leave blank to auto generate ids.
|
|
* @cfg {Array} fields An standard field array consisting of string name or object literal field definitions
|
|
* @cfg {Array} data The multi-dimensional array of data
|
|
* @constructor
|
|
* @param {Object} config
|
|
*/</i>
|
|
Ext.data.SimpleStore = <b>function</b>(config){
|
|
Ext.data.SimpleStore.superclass.constructor.call(<b>this</b>, {
|
|
reader: <b>new</b> Ext.data.ArrayReader({
|
|
id: config.id
|
|
},
|
|
Ext.data.Record.create(config.fields)
|
|
),
|
|
proxy : <b>new</b> Ext.data.MemoryProxy(config.data)
|
|
});
|
|
<b>this</b>.load();
|
|
};
|
|
Ext.extend(Ext.data.SimpleStore, Ext.data.Store);</code></pre><hr><div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright © 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
|
|
</body></html> |