/javascripts/lib/docs/output/Ext.data.Store.html
https://bitbucket.org/ksokmesa/sina-asian · HTML · 701 lines · 692 code · 9 blank · 0 comment · 0 complexity · 40f42bbf724195d7953d24a6f9af7bf4 MD5 · raw file
Large files are truncated click here to view the full file
- <div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.data.Store-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.data.Store-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.data.Store-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="inner-link" href="#Ext.data.Store-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a> <a class="bookmark" href="../docs/?class=Ext.data.Store"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.util.Observable.html" ext:member="" ext:cls="Ext.util.Observable">Observable</a> <img src="resources/elbow-end.gif">Store</pre></div><h1>Class <a href="source/Store.html#cls-Ext.data.Store">Ext.data.Store</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.data</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/Store.html#cls-Ext.data.Store">Store.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/Store.html#cls-Ext.data.Store">Store</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.data.ArrayStore.html" ext:cls="Ext.data.ArrayStore">ArrayStore</a>, <a href="output/Ext.data.DirectStore.html" ext:cls="Ext.data.DirectStore">DirectStore</a>, <a href="output/Ext.data.GroupingStore.html" ext:cls="Ext.data.GroupingStore">GroupingStore</a>, <a href="output/Ext.data.JsonStore.html" ext:cls="Ext.data.JsonStore">JsonStore</a>, <a href="output/Ext.data.XmlStore.html" ext:cls="Ext.data.XmlStore">XmlStore</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.util.Observable.html" ext:cls="Ext.util.Observable" ext:member="">Observable</a></td></tr></table><div class="description"><p>The Store class encapsulates a client side cache of <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Record</a>
- objects which provide input data for Components such as the <a href="output/Ext.grid.GridPanel.html" ext:cls="Ext.grid.GridPanel">GridPanel</a>,
- the <a href="output/Ext.form.ComboBox.html" ext:cls="Ext.form.ComboBox">ComboBox</a>, or the <a href="output/Ext.DataView.html" ext:cls="Ext.DataView">DataView</a>.</p>
- <p><u>Retrieving Data</u></p>
- <p>A Store object may access a data object using:<div class="mdetail-params"><ul>
- <li><a href="output/Ext.data.Store.html#Ext.data.Store-proxy" ext:member="proxy" ext:cls="Ext.data.Store">configured implementation</a> of <a href="output/Ext.data.DataProxy.html" ext:cls="Ext.data.DataProxy">DataProxy</a></li>
- <li><a href="output/Ext.data.Store.html#Ext.data.Store-data" ext:member="data" ext:cls="Ext.data.Store">data</a> to automatically pass in data</li>
- <li><a href="output/Ext.data.Store.html#Ext.data.Store-loadData" ext:member="loadData" ext:cls="Ext.data.Store">loadData</a> to manually pass in data</li>
- </ul></div></p>
- <p><u>Reading Data</u></p>
- <p>A Store object has no inherent knowledge of the format of the data object (it could be
- an Array, XML, or JSON). A Store object uses an appropriate <a href="output/Ext.data.Store.html#Ext.data.Store-reader" ext:member="reader" ext:cls="Ext.data.Store">configured implementation</a>
- of a <a href="output/Ext.data.DataReader.html" ext:cls="Ext.data.DataReader">DataReader</a> to create <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Record</a> instances from the data
- object.</p>
- <p><u>Store Types</u></p>
- <p>There are several implementations of Store available which are customized for use with
- a specific DataReader implementation. Here is an example using an ArrayStore which implicitly
- creates a reader commensurate to an Array data object.</p>
- <pre><code><b>var</b> myStore = <b>new</b> Ext.data.ArrayStore({
- fields: [<em>'fullname'</em>, <em>'first'</em>],
- idIndex: 0 <i>// id <b>for</b> each record will be the first element</i>
- });</code></pre>
- <p>For custom implementations create a basic <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a> configured as needed:</p>
- <pre><code><i>// create a <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Record</a> constructor:</i>
- <b>var</b> rt = Ext.data.Record.create([
- {name: <em>'fullname'</em>},
- {name: <em>'first'</em>}
- ]);
- <b>var</b> myStore = <b>new</b> Ext.data.Store({
- <i>// explicitly create reader</i>
- reader: <b>new</b> Ext.data.ArrayReader(
- {
- idIndex: 0 <i>// id <b>for</b> each record will be the first element</i>
- },
- rt <i>// recordType</i>
- )
- });</code></pre>
- <p>Load some data into store (note the data object is an array which corresponds to the reader):</p>
- <pre><code><b>var</b> myData = [
- [1, <em>'Fred Flintstone'</em>, <em>'Fred'</em>], <i>// note that id <b>for</b> the record is the first element</i>
- [2, <em>'Barney Rubble'</em>, <em>'Barney'</em>]
- ];
- myStore.loadData(myData);</code></pre>
- <p>Records are cached and made available through accessor functions. An example of adding
- a record to the store:</p>
- <pre><code><b>var</b> defaultData = {
- fullname: <em>'Full Name'</em>,
- first: <em>'First Name'</em>
- };
- <b>var</b> recId = 100; <i>// provide unique id <b>for</b> the record</i>
- <b>var</b> r = <b>new</b> myStore.recordType(defaultData, ++recId); <i>// create <b>new</b> record</i>
- myStore.<a href="output/Ext.data.Store.html#Ext.data.Store-insert" ext:member="insert" ext:cls="Ext.data.Store">insert</a>(0, r); <i>// insert a <b>new</b> record into the store (also see <a href="output/Ext.data.Store.html#Ext.data.Store-add" ext:member="add" ext:cls="Ext.data.Store">add</a>)</i></code></pre>
- <p><u>Writing Data</u></p>
- <p>And <b>new in Ext version 3</b>, use the new <a href="output/Ext.data.DataWriter.html" ext:cls="Ext.data.DataWriter">DataWriter</a> to create an automated, <a href="http://extjs.com/deploy/dev/examples/writer/writer.html">Writable Store</a>
- along with <a href="http://extjs.com/deploy/dev/examples/restful/restful.html">RESTful features.</a></div><div class="hr"></div><a id="Ext.data.Store-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-autoDestroy"></a><b><a href="source/Store.html#cfg-Ext.data.Store-autoDestroy">autoDestroy</a></b> : Boolean<div class="mdesc"><div class="short">true to destroy the store when the component the store is bound
- to is destroyed (defaults to false).
- Note: this shoul...</div><div class="long"><tt>true</tt> to destroy the store when the component the store is bound
- to is destroyed (defaults to <tt>false</tt>).
- <p><b>Note</b>: this should be set to true when using stores that are bound to only 1 component.</p></div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-autoLoad"></a><b><a href="source/Store.html#cfg-Ext.data.Store-autoLoad">autoLoad</a></b> : Boolean/Object<div class="mdesc"><div class="short">If data is not specified, and if autoLoad
- is true or an Object, this store's load method is automatically called
- afte...</div><div class="long">If <tt><a href="output/Ext.data.Store.html#Ext.data.Store-data" ext:member="data" ext:cls="Ext.data.Store">data</a></tt> is not specified, and if <tt>autoLoad</tt>
- is <tt>true</tt> or an <tt>Object</tt>, this store's <a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">load</a> method is automatically called
- after creation. If the value of <tt>autoLoad</tt> is an <tt>Object</tt>, this <tt>Object</tt> will
- be passed to the store's <a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">load</a> method.</div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-autoSave"></a><b><a href="source/Store.html#cfg-Ext.data.Store-autoSave">autoSave</a></b> : Boolean<div class="mdesc"><div class="short">Defaults to true causing the store to automatically save records to
- the server when a record is modified (ie: becomes...</div><div class="long"><p>Defaults to <tt>true</tt> causing the store to automatically <a href="output/Ext.data.Store.html#Ext.data.Store-save" ext:member="save" ext:cls="Ext.data.Store">save</a> records to
- the server when a record is modified (ie: becomes 'dirty'). Specify <tt>false</tt> to manually call <a href="output/Ext.data.Store.html#Ext.data.Store-save" ext:member="save" ext:cls="Ext.data.Store">save</a>
- to send all modifiedRecords to the server.</p>
- <br><p><b>Note</b>: each CRUD action will be sent as a separate request.</p></div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-baseParams"></a><b><a href="source/Store.html#cfg-Ext.data.Store-baseParams">baseParams</a></b> : Object<div class="mdesc"><div class="short">An object containing properties which are to be sent as parameters
- for every HTTP request.
- Parameters are encoded as ...</div><div class="long"><p>An object containing properties which are to be sent as parameters
- for <i>every</i> HTTP request.</p>
- <p>Parameters are encoded as standard HTTP parameters using <a href="output/Ext.html#Ext-urlEncode" ext:member="urlEncode" ext:cls="Ext">Ext.urlEncode</a>.</p>
- <p><b>Note</b>: <code>baseParams</code> may be superseded by any <code>params</code>
- specified in a <code><a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">load</a></code> request, see <code><a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">load</a></code>
- for more details.</p>
- This property may be modified after creation using the <code><a href="output/Ext.data.Store.html#Ext.data.Store-setBaseParam" ext:member="setBaseParam" ext:cls="Ext.data.Store">setBaseParam</a></code>
- method.</div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-batch"></a><b><a href="source/Store.html#cfg-Ext.data.Store-batch">batch</a></b> : Boolean<div class="mdesc"><div class="short">Defaults to true (unless restful:true). Multiple
- requests for each CRUD action (CREATE, READ, UPDATE and DESTROY) wil...</div><div class="long"><p>Defaults to <tt>true</tt> (unless <code><a href="output/Ext.data.Store.html#Ext.data.Store-restful" ext:member="restful" ext:cls="Ext.data.Store">restful</a>:true</code>). Multiple
- requests for each CRUD action (CREATE, READ, UPDATE and DESTROY) will be combined
- and sent as one transaction. Only applies when <code><a href="output/Ext.data.Store.html#Ext.data.Store-autoSave" ext:member="autoSave" ext:cls="Ext.data.Store">autoSave</a></code> is set
- to <tt>false</tt>.</p>
- <br><p>If Store is RESTful, the DataProxy is also RESTful, and a unique transaction is
- generated for each record.</p></div></div></td><td class="msource">Store</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-data"></a><b><a href="source/Store.html#cfg-Ext.data.Store-data">data</a></b> : Array<div class="mdesc">An inline data object readable by the <code><a href="output/Ext.data.Store.html#Ext.data.Store-reader" ext:member="reader" ext:cls="Ext.data.Store">reader</a></code>.
- Typically this option, or the <code><a href="output/Ext.data.Store.html#Ext.data.Store-url" ext:member="url" ext:cls="Ext.data.Store">url</a></code> option will be specified.</div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-defaultParamNames"></a><b><a href="source/Store.html#cfg-Ext.data.Store-defaultParamNames">defaultParamNames</a></b> : Object<div class="mdesc"><div class="short">Provides the default values for the paramNames property. To globally modify the parameters
- for all stores, this objec...</div><div class="long">Provides the default values for the <a href="output/Ext.data.Store.html#Ext.data.Store-paramNames" ext:member="paramNames" ext:cls="Ext.data.Store">paramNames</a> property. To globally modify the parameters
- for all stores, this object should be changed on the store prototype.</div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.util.Observable-listeners"></a><b><a href="source/Observable.html#cfg-Ext.util.Observable-listeners">listeners</a></b> : Object<div class="mdesc"><div class="short">A config object containing one or more event handlers to be added to this
- object during initialization. This should ...</div><div class="long"><p>A config object containing one or more event handlers to be added to this
- object during initialization. This should be a valid listeners config object as specified in the
- <a href="output/Ext.util.Observable.html#Ext.util.Observable-addListener" ext:member="addListener" ext:cls="Ext.util.Observable">addListener</a> example for attaching multiple handlers at once.</p>
- <br><p><b><u>DOM events from ExtJs <a href="output/Ext.Component.html" ext:cls="Ext.Component">Components</a></u></b></p>
- <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
- is usually only done when extra value can be added. For example the <a href="output/Ext.DataView.html" ext:cls="Ext.DataView">DataView</a>'s
- <b><code><a href="output/Ext.DataView.html#Ext.DataView-click" ext:member="click" ext:cls="Ext.DataView">click</a></code></b> event passing the node clicked on. To access DOM
- events directly from a Component's HTMLElement, listeners must be added to the <i><a href="output/Ext.Component.html#Ext.Component-getEl" ext:member="getEl" ext:cls="Ext.Component">Element</a></i> after the Component
- has been rendered. A plugin can simplify this step:<pre><code><i>// Plugin is configured <b>with</b> a listeners config object.</i>
- <i>// The Component is appended to the argument list of all handler functions.</i>
- Ext.DomObserver = Ext.extend(Object, {
- constructor: <b>function</b>(config) {
- this.listeners = config.listeners ? config.listeners : config;
- },
- <i>// Component passes itself into plugin's init method</i>
- init: <b>function</b>(c) {
- <b>var</b> p, l = this.listeners;
- <b>for</b> (p <b>in</b> l) {
- <b>if</b> (Ext.isFunction(l[p])) {
- l[p] = this.createHandler(l[p], c);
- } <b>else</b> {
- l[p].fn = this.createHandler(l[p].fn, c);
- }
- }
- <i>// Add the listeners to the Element immediately following the render call</i>
- c.render = c.render.<a href="output/Function.html#Function-createSequence" ext:member="createSequence" ext:cls="Function">createSequence</a>(<b>function</b>() {
- <b>var</b> e = c.getEl();
- <b>if</b> (e) {
- e.on(l);
- }
- });
- },
- createHandler: <b>function</b>(fn, c) {
- <b>return</b> <b>function</b>(e) {
- fn.call(this, e, c);
- };
- }
- });
- <b>var</b> combo = <b>new</b> Ext.form.ComboBox({
- <i>// Collapse combo when its element is clicked on</i>
- plugins: [ <b>new</b> Ext.DomObserver({
- click: <b>function</b>(evt, comp) {
- comp.collapse();
- }
- })],
- store: myStore,
- typeAhead: true,
- mode: <em>'local'</em>,
- triggerAction: <em>'all'</em>
- });</code></pre></p></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#listeners" ext:member="#listeners" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-paramNames"></a><b><a href="source/Store.html#cfg-Ext.data.Store-paramNames">paramNames</a></b> : Object<div class="mdesc"><div class="short">An object containing properties which specify the names of the paging and
- sorting parameters passed to remote servers...</div><div class="long"><p>An object containing properties which specify the names of the paging and
- sorting parameters passed to remote servers when loading blocks of data. By default, this
- object takes the following form:</p><pre><code>{
- start : <em>'start'</em>, <i>// The parameter name which specifies the start row</i>
- limit : <em>'limit'</em>, <i>// The parameter name which specifies number of rows to <b>return</b></i>
- sort : <em>'sort'</em>, <i>// The parameter name which specifies the column to sort on</i>
- dir : <em>'dir'</em> <i>// The parameter name which specifies the sort direction</i>
- }</code></pre>
- <p>The server must produce the requested data block upon receipt of these parameter names.
- If different parameter names are required, this property can be overriden using a configuration
- property.</p>
- <p>A <a href="output/Ext.PagingToolbar.html" ext:cls="Ext.PagingToolbar">PagingToolbar</a> bound to this Store uses this property to determine
- the parameter names to use in its <a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">requests</a>.</div></div></td><td class="msource">Store</td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-proxy"></a><b><a href="source/Store.html#cfg-Ext.data.Store-proxy">proxy</a></b> : Ext.data.DataProxy<div class="mdesc">The <a href="output/Ext.data.DataProxy.html" ext:cls="Ext.data.DataProxy">DataProxy</a> object which provides
- access to a data object. See <code><a href="output/Ext.data.Store.html#Ext.data.Store-url" ext:member="url" ext:cls="Ext.data.Store">url</a></code>.</div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-pruneModifiedRecords"></a><b><a href="source/Store.html#cfg-Ext.data.Store-pruneModifiedRecords">pruneModifiedRecords</a></b> : Boolean<div class="mdesc"><div class="short">true to clear all modified record information each time
- the store is loaded or when a record is removed (defaults to ...</div><div class="long"><tt>true</tt> to clear all modified record information each time
- the store is loaded or when a record is removed (defaults to <tt>false</tt>). See <a href="output/Ext.data.Store.html#Ext.data.Store-getModifiedRecords" ext:member="getModifiedRecords" ext:cls="Ext.data.Store">getModifiedRecords</a>
- for the accessor method to retrieve the modified records.</div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-reader"></a><b><a href="source/Store.html#cfg-Ext.data.Store-reader">reader</a></b> : Ext.data.DataReader<div class="mdesc"><div class="short">The Reader object which processes the
- data object and returns an Array of Ext.data.Record objects which are cached ke...</div><div class="long">The <a href="output/Ext.data.DataReader.html" ext:cls="Ext.data.DataReader">Reader</a> object which processes the
- data object and returns an Array of <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a> objects which are cached keyed by their
- <b><tt><a href="output/Ext.data.Record.html#Ext.data.Record-id" ext:member="id" ext:cls="Ext.data.Record">id</a></tt></b> property.</div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-remoteSort"></a><b><a href="source/Store.html#cfg-Ext.data.Store-remoteSort">remoteSort</a></b> : boolean<div class="mdesc"><div class="short">true if sorting is to be handled by requesting the Proxy
- to provide a refreshed version of the data object in sorted ...</div><div class="long"><tt>true</tt> if sorting is to be handled by requesting the <tt><a href="output/Ext.data.Store.html#Ext.data.Store-proxy" ext:member="proxy" ext:cls="Ext.data.Store">Proxy</a></tt>
- to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache
- in place (defaults to <tt>false</tt>).
- <p>If <tt>remoteSort</tt> is <tt>true</tt>, then clicking on a <a href="output/Ext.grid.Column.html" ext:cls="Ext.grid.Column">Grid Column</a>'s
- <a href="output/Ext.grid.Column.html#Ext.grid.Column-header" ext:member="header" ext:cls="Ext.grid.Column">header</a> causes the current page to be requested from the server appending
- the following two parameters to the <b><tt><a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">params</a></tt></b>:<div class="mdetail-params"><ul>
- <li><b><tt>sort</tt></b> : String<p class="sub-desc">The <tt>name</tt> (as specified in the Record's
- <a href="output/Ext.data.Field.html" ext:cls="Ext.data.Field">Field definition</a>) of the field to sort on.</p></li>
- <li><b><tt>dir</tt></b> : String<p class="sub-desc">The direction of the sort, 'ASC' or 'DESC' (case-sensitive).</p></li>
- </ul></div></p></div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-restful"></a><b><a href="source/Store.html#cfg-Ext.data.Store-restful">restful</a></b> : Boolean<div class="mdesc"><div class="short">Defaults to false. Set to true to have the Store and the set
- Proxy operate in a RESTful manner. The store will autom...</div><div class="long">Defaults to <tt>false</tt>. Set to <tt>true</tt> to have the Store and the set
- Proxy operate in a RESTful manner. The store will automatically generate GET, POST,
- PUT and DELETE requests to the server. The HTTP method used for any given CRUD
- action is described in <a href="output/Ext.data.Api.html#Ext.data.Api-restActions" ext:member="restActions" ext:cls="Ext.data.Api">Ext.data.Api.restActions</a>. For additional information
- see <a href="output/Ext.data.DataProxy.html#Ext.data.DataProxy-restful" ext:member="restful" ext:cls="Ext.data.DataProxy">Ext.data.DataProxy.restful</a>.
- <p><b>Note</b>: if <code><a href="output/Ext.data.Store.html#Ext.data.Store-restful" ext:member="restful" ext:cls="Ext.data.Store">restful</a>:true</code> <code>batch</code> will
- internally be set to <tt>false</tt>.</p></div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-sortInfo"></a><b><a href="source/Store.html#cfg-Ext.data.Store-sortInfo">sortInfo</a></b> : Object<div class="mdesc"><div class="short">A config object to specify the sort order in the request of a Store's
- load operation. Note that for local sorting, t...</div><div class="long">A config object to specify the sort order in the request of a Store's
- <a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">load</a> operation. Note that for local sorting, the <tt>direction</tt> property is
- case-sensitive. See also <a href="output/Ext.data.Store.html#Ext.data.Store-remoteSort" ext:member="remoteSort" ext:cls="Ext.data.Store">remoteSort</a> and <a href="output/Ext.data.Store.html#Ext.data.Store-paramNames" ext:member="paramNames" ext:cls="Ext.data.Store">paramNames</a>.
- For example:<pre><code>sortInfo: {
- field: <em>'fieldName'</em>,
- direction: <em>'ASC'</em> <i>// or <em>'DESC'</em> (<b>case</b> sensitive <b>for</b> local sorting)</i>
- }</code></pre></div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-storeId"></a><b><a href="source/Store.html#cfg-Ext.data.Store-storeId">storeId</a></b> : String<div class="mdesc"><div class="short">If passed, the id to use to register with the StoreMgr.
- Note: if a (deprecated) id is specified it will supersede the...</div><div class="long">If passed, the id to use to register with the <b><a href="output/Ext.StoreMgr.html" ext:cls="Ext.StoreMgr">StoreMgr</a></b>.
- <p><b>Note</b>: if a (deprecated) <tt><a href="output/Ext.data.Store.html#Ext.data.Store-id" ext:member="id" ext:cls="Ext.data.Store">id</a></tt> is specified it will supersede the <tt>storeId</tt>
- assignment.</p></div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-url"></a><b><a href="source/Store.html#cfg-Ext.data.Store-url">url</a></b> : String<div class="mdesc"><div class="short">If a proxy is not specified the url will be used to
- implicitly configure a HttpProxy if an url is specified.
- Typicall...</div><div class="long">If a <tt><a href="output/Ext.data.Store.html#Ext.data.Store-proxy" ext:member="proxy" ext:cls="Ext.data.Store">proxy</a></tt> is not specified the <tt>url</tt> will be used to
- implicitly configure a <a href="output/Ext.data.HttpProxy.html" ext:cls="Ext.data.HttpProxy">HttpProxy</a> if an <tt>url</tt> is specified.
- Typically this option, or the <code><a href="output/Ext.data.Store.html#Ext.data.Store-data" ext:member="data" ext:cls="Ext.data.Store">data</a></code> option will be specified.</div></div></td><td class="msource">Store</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-writer"></a><b><a href="source/Store.html#cfg-Ext.data.Store-writer">writer</a></b> : Ext.data.DataWriter<div class="mdesc"><div class="short">The Writer object which processes a record object for being written
- to the server-side database.
- When a writer is ins...</div><div class="long"><p>The <a href="output/Ext.data.DataWriter.html" ext:cls="Ext.data.DataWriter">Writer</a> object which processes a record object for being written
- to the server-side database.</p>
- <br><p>When a writer is installed into a Store the <a href="output/Ext.data.Store.html#Ext.data.Store-add" ext:member="add" ext:cls="Ext.data.Store">add</a>, <a href="output/Ext.data.Store.html#Ext.data.Store-remove" ext:member="remove" ext:cls="Ext.data.Store">remove</a>, and <a href="output/Ext.data.Store.html#Ext.data.Store-update" ext:member="update" ext:cls="Ext.data.Store">update</a>
- events on the store are monitored in order to remotely <a href="output/Ext.data.Store.html#Ext.data.Store-createRecords" ext:member="createRecords" ext:cls="Ext.data.Store">create records</a>,
- <a href="output/Ext.data.Store.html#Ext.data.Store-destroyRecord" ext:member="destroyRecord" ext:cls="Ext.data.Store">destroy records</a>, or <a href="output/Ext.data.Store.html#Ext.data.Store-updateRecord" ext:member="updateRecord" ext:cls="Ext.data.Store">update records</a>.</p>
- <br><p>The proxy for this store will relay any <a href="output/Ext.data.Store.html#Ext.data.Store-writexception" ext:member="writexception" ext:cls="Ext.data.Store">writexception</a> events to this store.</p>
- <br><p>Sample implementation:
- <pre><code><b>var</b> writer = <b>new</b> <a href="output/Ext.data.JsonWriter.html" ext:cls="Ext.data.JsonWriter">Ext.data.JsonWriter</a>({
- encode: true,
- writeAllFields: true <i>// write all fields, not just those that changed</i>
- });
- <i>// Typical Store collecting the Proxy, Reader and Writer together.</i>
- <b>var</b> store = <b>new</b> Ext.data.Store({
- storeId: <em>'user'</em>,
- root: <em>'records'</em>,
- proxy: proxy,
- reader: reader,
- writer: writer, <i>// <-- plug a DataWriter into the store just as you would a Reader</i>
- paramsAsHash: true,
- autoSave: false <i>// <-- false to delay executing create, update, destroy requests</i>
- <i>// until specifically told to <b>do</b> so.</i>
- });</code></pre></p></div></div></td><td class="msource">Store</td></tr></tbody></table><a id="Ext.data.Store-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-baseParams"></a><b><a href="source/Store.html#prop-Ext.data.Store-baseParams">baseParams</a></b> : Object<div class="mdesc"><div class="short">See the corresponding configuration option
- for a description of this property.
- To modify this property see setBasePar...</div><div class="long">See the <code><a href="output/Ext.data.Store.html#Ext.data.Store-baseParams" ext:member="baseParams" ext:cls="Ext.data.Store">corresponding configuration option</a></code>
- for a description of this property.
- To modify this property see <code><a href="output/Ext.data.Store.html#Ext.data.Store-setBaseParam" ext:member="setBaseParam" ext:cls="Ext.data.Store">setBaseParam</a></code>.</div></div></td><td class="msource">Store</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-fields"></a><b><a href="source/Store.html#prop-Ext.data.Store-fields">fields</a></b> : Ext.util.MixedCollection<div class="mdesc">A <a href="output/Ext.util.MixedCollection.html" ext:cls="Ext.util.MixedCollection">MixedCollection</a> containing the defined <a href="output/Ext.data.Field.html" ext:cls="Ext.data.Field">Field</a>s
- for the <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Records</a> stored in this Store. Read-only.</div></td><td class="msource">Store</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-hasMultiSort"></a><b><a href="source/Store.html#prop-Ext.data.Store-hasMultiSort">hasMultiSort</a></b> : Boolean
- True if this store is currently sorted by more than one field/direction combination.<div class="mdesc"></div></td><td class="msource">Store</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-isDestroyed"></a><b><a href="source/Store.html#prop-Ext.data.Store-isDestroyed">isDestroyed</a></b> : Boolean
- True if the store has been destroyed already. Read only<div class="mdesc"></div></td><td class="msource">Store</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-lastOptions"></a><b><a href="source/Store.html#prop-Ext.data.Store-lastOptions">lastOptions</a></b> : Object<div class="mdesc"><div class="short">Contains the last options object used as the parameter to the load method. See load
- for the details of what this may ...</div><div class="long">Contains the last options object used as the parameter to the <a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">load</a> method. See <a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">load</a>
- for the details of what this may contain. This may be useful for accessing any params which were used
- to load the current Record cache.</div></div></td><td class="msource">Store</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-multiSortInfo"></a><b><a href="source/Store.html#prop-Ext.data.Store-multiSortInfo">multiSortInfo</a></b> : Object
- Object containing overall sort direction and an ordered array of sorter configs used when sorting on multiple fields<div class="mdesc"></div></td><td class="msource">Store</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-recordType"></a><b><a href="source/Store.html#prop-Ext.data.Store-recordType">recordType</a></b> : Function<div class="mdesc"><div class="short">The Record constructor as supplied to (or created by) the
- Reader. Read-only.
- If the Reader was constructed by passing...</div><div class="long">The <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Record</a> constructor as supplied to (or created by) the
- <a href="output/Ext.data.DataReader.html" ext:cls="Ext.data.DataReader">Reader</a>. Read-only.
- <p>If the Reader was constructed by passing in an Array of <a href="output/Ext.data.Field.html" ext:cls="Ext.data.Field">Ext.data.Field</a> definition objects,
- instead of a Record constructor, it will implicitly create a Record constructor from that Array (see
- <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a>.<a href="output/Ext.data.Record.html#Ext.data.Record-create" ext:member="create" ext:cls="Ext.data.Record">create</a> for additional details).</p>
- <p>This property may be used to create new Records of the type held in this Store, for example:</p><pre><code><i>// create the data store</i>
- <b>var</b> store = <b>new</b> Ext.data.ArrayStore({
- autoDestroy: true,
- fields: [
- {name: <em>'company'</em>},
- {name: <em>'price'</em>, type: <em>'float'</em>},
- {name: <em>'change'</em>, type: <em>'float'</em>},
- {name: <em>'pctChange'</em>, type: <em>'float'</em>},
- {name: <em>'lastChange'</em>, type: <em>'date'</em>, dateFormat: <em>'n/j h:ia'</em>}
- ]
- });
- store.loadData(myData);
- <i>// create the Grid</i>
- <b>var</b> grid = <b>new</b> Ext.grid.EditorGridPanel({
- store: store,
- colModel: <b>new</b> Ext.grid.ColumnModel({
- columns: [
- {id:<em>'company'</em>, header: <em>'Company'</em>, width: 160, dataIndex: <em>'company'</em>},
- {header: <em>'Price'</em>, renderer: <em>'usMoney'</em>, dataIndex: <em>'price'</em>},
- {header: <em>'Change'</em>, renderer: change, dataIndex: <em>'change'</em>},
- {header: <em>'% Change'</em>, renderer: pctChange, dataIndex: <em>'pctChange'</em>},
- {header: <em>'Last Updated'</em>, width: 85,
- renderer: Ext.util.Format.dateRenderer(<em>'m/d/Y'</em>),
- dataIndex: <em>'lastChange'</em>}
- ],
- defaults: {
- sortable: true,
- width: 75
- }
- }),
- autoExpandColumn: <em>'company'</em>, <i>// match the id specified <b>in</b> the column model</i>
- height:350,
- width:600,
- title:<em>'Array Grid'</em>,
- tbar: [{
- text: <em>'Add Record'</em>,
- handler : <b>function</b>(){
- <b>var</b> defaultData = {
- change: 0,
- company: <em>'New Company'</em>,
- lastChange: (<b>new</b> Date()).clearTime(),
- pctChange: 0,
- price: 10
- };
- <b>var</b> recId = 3; <i>// provide unique id</i>
- <b>var</b> p = <b>new</b> store.recordType(defaultData, recId); <i>// create <b>new</b> record</i>
- grid.stopEditing();
- store.<a href="output/Ext.data.Store.html#Ext.data.Store-insert" ext:member="insert" ext:cls="Ext.data.Store">insert</a>(0, p); <i>// insert a <b>new</b> record into the store (also see <a href="output/Ext.data.Store.html#Ext.data.Store-add" ext:member="add" ext:cls="Ext.data.Store">add</a>)</i>
- grid.startEditing(0, 0);
- }
- }]
- });</code></pre></div></div></td><td class="msource">Store</td></tr></tbody></table><a id="Ext.data.Store-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-Store"></a><b><a href="source/Store.html#cls-Ext.data.Store">Store</a></b>( <code>Object config</code> )
- <div class="mdesc"><div class="short">Creates a new Store.</div><div class="long">Creates a new Store.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>config</code> : Object<div class="sub-desc">A config object containing the objects needed for the Store to access data,
- and read the data into Records.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Store</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-add"></a><b><a href="source/Store.html#method-Ext.data.Store-add">add</a></b>( <code>Ext.data.Record[] records</code> )
- :
- void<div class="mdesc"><div class="short">Add Records to the Store and fires the add event. To add Records
- to the store from a remote source use load({add:tru...</div><div class="long">Add Records to the Store and fires the <a href="output/Ext.data.Store.html#Ext.data.Store-add" ext:member="add" ext:cls="Ext.data.Store">add</a> event. To add Records
- to the store from a remote source use <code><a href="output/Ext.data.Store.html#Ext.data.Store-load" ext:member="load" ext:cls="Ext.data.Store">load</a>({add:true})</code>.
- See also <code><a href="output/Ext.data.Store.html#Ext.data.Store-recordType" ext:member="recordType" ext:cls="Ext.data.Store">recordType</a></code> and <code><a href="output/Ext.data.Store.html#Ext.data.Store-insert" ext:member="insert" ext:cls="Ext.data.Store">insert</a></code>.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>records</code> : Ext.data.Record[]<div class="sub-desc">An Array of Ext.data.Record objects
- to add to the cache. See <a href="output/Ext.data.Store.html#Ext.data.Store-recordType" ext:member="recordType" ext:cls="Ext.data.Store">recordType</a>.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Store</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.util.Observable-addEvents"></a><b><a href="source/Observable.html#method-Ext.util.Observable-addEvents">addEvents</a></b>( <code>Object|String o</code>, <code>string Optional.</code> )
- :
- void<div class="mdesc"><div class="short">Adds the specified events to the list of events which this Observable may fire.</div><div class="long">Adds the specified events to the list of events which this Observable may fire.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>o</code> : Object|String<div class="sub-desc">Either an object with event names as properties with a value of <code>true</code>
- or the first event name string if multiple event names are being passed as separate parameters.</div></li><li><code>Optional.</code> : string<div class="sub-desc">Event name if multiple event names are being passed as separate parameters.
- Usage:<pre><code>this.addEvents(<em>'storeloaded'</em>, <em>'storecleared'</em>);</code></pre></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#addEvents" ext:member="#addEvents" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.util.Observable-addListener"></a><b><a href="source/Observable.html#method-Ext.util.Observable-addListener">addListener</a></b>( <code>String eventName</code>, <code>Function handler</code>, <span title="Optional" class="optional">[<code>Object scope</code>]</span>, <span title="Optional" class="optional">[<code>Object options</code>]</span> )
- :
- void<div class="mdesc"><div class="short">Appends an event handler to this object.</div><div class="long">Appends an event handler to this object.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to listen for.</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
- <b>If omitted, defaults to the object which fired the event.</b></div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration.
- properties. This may contain any of the following properties:<ul>
- <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
- <b>If omitted, defaults to the object which fired the event.</b></div></li>
- <li><b>delay</b> : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
- <li><b>single</b> : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
- <li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an <a href="output/Ext.util.DelayedTask.html" ext:cls="Ext.util.DelayedTask">Ext.util.DelayedTask</a> delayed
- by the specified number of milliseconds. If the event fires again within that time, the original
- handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
- <li><b>target</b> : Observable<div class="sub-desc">Only call the handler if the event was fired on the target Observable, <i>not</i>
- if the event was bubbled up from a child Observable.</div></li>
- </ul><br>
- <p>
- <b>Combining Options</b><br>
- Using the options argument, it is possible to combine different types of listeners:<br>
- <br>
- A delayed, one-time listener.
- <pre><code>myDataView.on(<em>'click'</em>, this.onClick, this, {
- single: true,
- delay: 100
- });</code></pre>
- <p>
- <b>Attaching multiple handlers in 1 call</b><br>
- The method also allows for a single argument to be passed which is a config object containing properties
- which specify multiple handlers.
- <p>
- <pre><code>myGridPanel.on({
- <em>'click'</em> : {
- fn: this.onClick,
- scope: this,
- delay: 100
- },
- <em>'mouseover'</em> : {
- fn: this.onMouseOver,
- scope: this
- },
- <em>'mouseout'</em> : {
- fn: this.onMouseOut,
- scope: this
- }
- });</code></pre>
- <p>
- Or a shorthand syntax:<br>
- <pre><code>myGridPanel.on({
- <em>'click'</em> : this.onClick,
- <em>'mouseover'</em> : this.onMouseOver,
- <em>'mouseout'</em> : this.onMouseOut,
- scope: this
- });</code></pre></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource"><a href="output/Ext.util.Observable.html#addListener" ext:member="#addListener" ext:cls="Ext.util.Observable">Observable</a></td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-addSorted"></a><b><a href="source/Store.html#method-Ext.data.Store-addSorted">addSorted</a></b>( <code>Ext.data.Record record</code> )
- :
- void<div class="mdesc"><div class="short">(Local sort only) Inserts the passed Record into the Store at the index where it
- should go based on the current sort ...</div><div class="long">(Local sort only) Inserts the passed Record into the Store at the index where it
- should go based on the current sort information.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>record</code> : Ext.data.Record<div class="sub-desc"></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Store</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-clearFilter"></a><b><a href="source/Store.html#method-Ext.data.Store-clearFilter">clearFilter</a></b>( <code>Boolean suppressEvent</code> )
- :
- void<div class="mdesc"><div class="short">Revert to a view of the Record cache with no filtering applied.</div><div class="long">Revert to a view of the Record cache with no filtering applied.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>suppressEvent</code> : Boolean<div class="sub-desc">If <tt>true</tt> the filter is cleared silently without firing the
- <a href="output/Ext.data.Store.html#Ext.data.Store-datachanged" ext:member="datachanged" ext:cls="Ext.data.Store">datachanged</a> event.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Store</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-collect"></a><b><a href="source/Store.html#method-Ext.data.Store-collect">collect</a></b>( <code>String dataIndex</code>, <span title="Optional" class="optional">[<code>Boolean allowNull</code>]</span>, <span title="Optional" class="optional">[<code>Boolean bypassFilter</code>]</span> )
- :
- Array<div class="mdesc"><div class="short">Collects unique values for a particular dataIndex from this store.</div><div class="long">Collects unique values for a particular dataIndex from this store.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>dataIndex</code> : String<div class="sub-desc">The property to collect</div></li><li><code>allowNull</code> : Boolean<div class="sub-desc">(optional) Pass true to allow null, undefined or empty string values</div></li><li><code>bypassFilter</code> : Boolean<div class="sub-desc">(optional) Pass true to collect from all records, even ones which are filtered</div></li></ul><strong>Returns:</strong><ul><li><code>Array</code><div class="sub-desc">An array of the unique values</div></li></ul></div></div></div></td><td class="msource">Store</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-commitChanges"></a><b><a href="source/Store.html#method-Ext.data.Store-commitChanges">commitChanges</a></b>()
- :
- void<div class="mdesc"><div class="short">Commit all Records with outstanding changes. To handle updates for changes,
- subscribe to the Store's update event, an...</div><div class="long">Commit all Records with <a href="output/Ext.data.Store.html#Ext.data.Store-getModifiedRecords" ext:member="getModifiedRecords" ext:cls="Ext.data.Store">outstanding changes</a>. To handle updates for changes,
- subscribe to the Store's <a href="output/Ext.data.Store.html#Ext.data.Store-update" ext:member="update" ext:cls="Ext.data.Store">update event</a>, and perform updating when the third parameter is
- Ext.data.Record.COMMIT.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Store</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-destroy"></a><b><a href="source/Store.html#method-Ext.data.Store-destroy">destroy</a></b>()
- :
- void<div class="mdesc"><div class="short">Destroys the store.</div><div class="long">Destroys the store.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">Store</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.Store-each"></a><b><a href="source/Store.html#method-Ext.data.Store-each">each</a></b>( <code>Function fn</code>, <span title="Optional" class="optional">[<code>Object scope</code>]</span> )
- :
- void<div class="mdesc"><div class="short">Calls the specified function for each of the Records in the cache.</div><div class="long">Calls the specified function for each of the <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Records</a> in the cache.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>fn</code> : Function<div class="sub-desc">The function to call. The <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Record</a> is passed as the first parameter.
- Returning <tt>false</tt> aborts and exits the iteration.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (<code>this</code>…