Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.data.DirectStore.html
1 <!DOCTYPE html><html><head><title>Ext.data.DirectStore | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
2 <style type="text/css">.head-band { display: none; }
3 .header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
4 .doc-tab .members .member a.more { background-color: #efefef; }
5 </style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
6 </head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
7 <a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
8
9     req = {
10         liveURL: '.',
11         standAloneMode: true,
12         origDocClass: 'Ext.data.DirectStore',
13         docClass: 'Ext.data.DirectStore',
14         docReq: 'Ext.data.DirectStore',
15         version: '4.0',
16         baseURL: '.',
17         baseDocURL: '.',
18         baseProdURL: '.'
19     };
20
21     clsInfo = {};
22
23
24
25 </script>
26
27 <script type="text/javascript" src="../search.js"></script>
28 <!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
29 <script type="text/javascript" src="../class_tree.js"></script>
30 <script type="text/javascript" src="../class_doc.js"></script>
31 <script type="text/javascript">
32     req.source = 'DirectStore.html#Ext-data.DirectStore';
33     clsInfo = {"methods":["DirectStore","add","addEvents","addListener","addManagedListener","aggregate","average","capture","clearFilter","clearGrouping","clearListeners","clearManagedListeners","collect","count","each","enableBubble","filter","filterBy","find","findBy","findExact","findRecord","fireEvent","first","getAt","getById","getCount","getGroupString","getGroups","getNewRecords","getPageFromRecordIndex","getProxy","getRange","getSortState","getTotalCount","getUpdatedRecords","group","guaranteeRange","hasListener","hasPendingRequests","indexOf","indexOfId","indexOfTotal","initSortable","insert","isFiltered","isGrouped","isLoading","last","load","loadData","loadPage","loadRecords","max","min","nextPage","observe","on","prefetch","prefetchPage","previousPage","purgeRecords","queryBy","relayEvents","releaseCapture","remove","removeAll","removeAt","removeListener","removeManagedListener","resumeEvents","setProxy","sort","sum","suspendEvents","sync","un"],"cfgs":["autoLoad","autoSync","buffered","clearOnPageLoad","data","fields","listeners","model","proxy","purgePageCount","remoteFilter","remoteGroup","remoteSort","sortOnFilter","storeId"],"properties":["","batchUpdateMode","currentPage","data","defaultProxyType","defaultSortDirection","filterOnLoad","filters","groupDir","groupField","groupers","isDestroyed","isSortable","pageSize","removeAll","snapshot","sortOnLoad","sortRoot","sorters"],"events":["add","beforeload","beforeprefetch","beforesync","clear","datachanged","groupchange","load","remove","update"],"subclasses":[]};
34     Ext.onReady(function() {
35         Ext.create('Docs.classPanel');
36     });
37 </script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/DirectStore.html#Ext-data.DirectStore" target="_blank">Ext.data.DirectStore</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><pre class="subclasses"><h4>Hierarchy</h4><div class="subclass f"><a href="Ext.data.AbstractStore.html" rel="Ext.data.AbstractStore" class="cls docClass">Ext.data.AbstractStore</a><div class="subclass"><a href="Ext.data.Store.html" rel="Ext.data.Store" class="cls docClass">Ext.data.Store</a><div class="subclass"><strong>Ext.data.DirectStore</strong></div></div></div><h4>Mixins</h4><div class="mixin"><a href="Ext.util.Observable.html" rel="Ext.util.Observable" class="cls docClass">Ext.util.Observable</a></div><div class="mixin"><a href="Ext.util.Sortable.html" rel="Ext.util.Sortable" class="cls docClass">Ext.util.Sortable</a></div></pre><p>Small helper class to create an <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Ext.data.Store</a> configured with an
38 <a href="Ext.data.proxy.Direct.html" rel="Ext.data.proxy.Direct" class="docClass">Ext.data.proxy.Direct</a> and <a href="Ext.data.reader.Json.html" rel="Ext.data.reader.Json" class="docClass">Ext.data.reader.Json</a> to make interacting
39 with an <a href="Ext.Direct.html" rel="Ext.Direct" class="docClass">Ext.Direct</a> Server-side <a href="Ext.direct.Provider.html" rel="Ext.direct.Provider" class="docClass">Provider</a> easier.
40 To create a different proxy/reader combination create a basic <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Ext.data.Store</a>
41 configured as needed.</p>
42
43
44
45
46 <p><b>*Note:</b> Although they are not listed, this class inherits all of the config options of:</p>
47
48
49 <div><ul class="mdetail-params">
50 <li><b><a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Store</a></b></li>
51 <div class="sub-desc"><ul class="mdetail-params">
52
53 </ul></div>
54 <li><b><a href="Ext.data.reader.Json.html" rel="Ext.data.reader.Json" class="docClass">JsonReader</a></b></li>
55 <div class="sub-desc"><ul class="mdetail-params">
56 <li><tt><b><a href="Ext.data.reader.Json.html#root" rel="Ext.data.reader.Json#root" class="docClass">root</a></b></tt></li>
57 <li><tt><b><a href="Ext.data.reader.Json.html#idProperty" rel="Ext.data.reader.Json#idProperty" class="docClass">idProperty</a></b></tt></li>
58 <li><tt><b><a href="Ext.data.reader.Json.html#totalProperty" rel="Ext.data.reader.Json#totalProperty" class="docClass">totalProperty</a></b></tt></li>
59 </ul></div>
60
61 <li><b><a href="Ext.data.proxy.Direct.html" rel="Ext.data.proxy.Direct" class="docClass">DirectProxy</a></b></li>
62 <div class="sub-desc"><ul class="mdetail-params">
63 <li><tt><b><a href="Ext.data.proxy.Direct.html#directFn" rel="Ext.data.proxy.Direct#directFn" class="docClass">directFn</a></b></tt></li>
64 <li><tt><b><a href="Ext.data.proxy.Direct.html#paramOrder" rel="Ext.data.proxy.Direct#paramOrder" class="docClass">paramOrder</a></b></tt></li>
65 <li><tt><b><a href="Ext.data.proxy.Direct.html#paramsAsHash" rel="Ext.data.proxy.Direct#paramsAsHash" class="docClass">paramsAsHash</a></b></tt></li>
66 </ul></div>
67 </ul></div>
68
69 <div class="members"><div class="m-cfgs"><div class="definedBy">Defined By</div><a name="configs"></a><h3 class="cfg p">Config Options</h3><h4 class="cfgGroup">Other Configs</h4><div id="config-autoLoad" class="member f inherited"><a href="Ext.data.DirectStore.html#config-autoLoad" rel="config-autoLoad" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-cfg-autoLoad" class="viewSource">view source</a></div><a name="autoLoad"></a><a name="config-autoLoad"></a><a href="Ext.data.DirectStore.html#" rel="config-autoLoad" class="cls expand">autoLoad</a><span> : Boolean/Object</span></div><div class="description"><div class="short">If data is not specified, and if autoLoad is true or an Object, this store's load method
70 is automatically called afte...</div><div class="long"><p>If data is not specified, and if autoLoad is true or an Object, this store's load method
71 is automatically called after creation. If the value of autoLoad is an Object, this Object will be passed to the store's
72 load method. Defaults to false.</p>
73 </div></div></div><div id="config-autoSync" class="member inherited"><a href="Ext.data.DirectStore.html#config-autoSync" rel="config-autoSync" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-cfg-autoSync" class="viewSource">view source</a></div><a name="autoSync"></a><a name="config-autoSync"></a><a href="Ext.data.DirectStore.html#" rel="config-autoSync" class="cls expand">autoSync</a><span> : Boolean</span></div><div class="description"><div class="short"><p>True to automatically sync the Store with its Proxy after every edit to one of its Records.
74 Defaults to false.</p>
75 </div><div class="long"><p>True to automatically sync the Store with its Proxy after every edit to one of its Records.
76 Defaults to false.</p>
77 </div></div></div><div id="config-buffered" class="member inherited"><a href="Ext.data.DirectStore.html#config-buffered" rel="config-buffered" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-buffered" class="viewSource">view source</a></div><a name="buffered"></a><a name="config-buffered"></a><a href="Ext.data.DirectStore.html#" rel="config-buffered" class="cls expand">buffered</a><span> : Boolean</span></div><div class="description"><div class="short">Allow the store to buffer and pre-fetch pages of records. This is to be used in conjunction with a view will
78 tell the...</div><div class="long"><p>Allow the store to buffer and pre-fetch pages of records. This is to be used in conjunction with a view will
79 tell the store to pre-fetch records ahead of a time.</p>
80 </div></div></div><div id="config-clearOnPageLoad" class="member inherited"><a href="Ext.data.DirectStore.html#config-clearOnPageLoad" rel="config-clearOnPageLoad" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-clearOnPageLoad" class="viewSource">view source</a></div><a name="clearOnPageLoad"></a><a name="config-clearOnPageLoad"></a><a href="Ext.data.DirectStore.html#" rel="config-clearOnPageLoad" class="cls expand">clearOnPageLoad</a><span> : Boolean</span></div><div class="description"><div class="short">True to empty the store when loading another page via loadPage,
81 nextPage or previousPage (defaults to true). Setting ...</div><div class="long"><p>True to empty the store when loading another page via <a href="Ext.data.DirectStore.html#loadPage" rel="Ext.data.DirectStore#loadPage" class="docClass">loadPage</a>,
82 <a href="Ext.data.DirectStore.html#nextPage" rel="Ext.data.DirectStore#nextPage" class="docClass">nextPage</a> or <a href="Ext.data.DirectStore.html#previousPage" rel="Ext.data.DirectStore#previousPage" class="docClass">previousPage</a> (defaults to true). Setting to false keeps existing records, allowing
83 large data sets to be loaded one page at a time but rendered all together.</p>
84 </div></div></div><div id="config-data" class="member inherited"><a href="Ext.data.DirectStore.html#config-data" rel="config-data" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-data" class="viewSource">view source</a></div><a name="data"></a><a name="config-data"></a><a href="Ext.data.DirectStore.html#" rel="config-data" class="cls expand">data</a><span> : Array</span></div><div class="description"><div class="short"><p>Optional array of Model instances or data objects to load locally. See "Inline data" above for details.</p>
85 </div><div class="long"><p>Optional array of Model instances or data objects to load locally. See "Inline data" above for details.</p>
86 </div></div></div><div id="config-fields" class="member inherited"><a href="Ext.data.DirectStore.html#config-fields" rel="config-fields" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-cfg-fields" class="viewSource">view source</a></div><a name="fields"></a><a name="config-fields"></a><a href="Ext.data.DirectStore.html#" rel="config-fields" class="cls expand">fields</a><span> : Array</span></div><div class="description"><div class="short">This may be used in place of specifying a model configuration. The fields should be a
87 set of Ext.data.Field configura...</div><div class="long"><p>This may be used in place of specifying a <a href="Ext.data.DirectStore.html#model" rel="Ext.data.DirectStore#model" class="docClass">model</a> configuration. The fields should be a
88 set of <a href="Ext.data.Field.html" rel="Ext.data.Field" class="docClass">Ext.data.Field</a> configuration objects. The store will automatically create a <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a>
89 with these fields. In general this configuration option should be avoided, it exists for the purposes of
90 backwards compatibility. For anything more complicated, such as specifying a particular id property or
91 assocations, a <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> should be defined and specified for the <a href="Ext.data.DirectStore.html#model" rel="Ext.data.DirectStore#model" class="docClass">model</a> config.</p>
92 </div></div></div><div id="config-listeners" class="member inherited"><a href="Ext.data.DirectStore.html#config-listeners" rel="config-listeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-cfg-listeners" class="viewSource">view source</a></div><a name="listeners"></a><a name="config-listeners"></a><a href="Ext.data.DirectStore.html#" rel="config-listeners" class="cls expand">listeners</a><span> : Object</span></div><div class="description"><div class="short">(optional) A config object containing one or more event handlers to be added to this
93 object during initialization.  T...</div><div class="long"><p>(optional) <p>A config object containing one or more event handlers to be added to this
94 object during initialization.  This should be a valid listeners config object as specified in the
95 <a href="Ext.data.DirectStore.html#addListener" rel="Ext.data.DirectStore#addListener" class="docClass">addListener</a> example for attaching multiple handlers at once.</p></p>
96
97 <br><p><b><u>DOM events from ExtJs <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a></u></b></p>
98
99
100 <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
101
102
103 <p>is usually only done when extra value can be added. For example the <a href="Ext.view.View.html" rel="Ext.view.View" class="docClass">DataView</a>'s
104 <b><code><a href="Ext.view.View.html#click" rel="Ext.view.View#click" class="docClass">click</a></code></b> event passing the node clicked on. To access DOM
105 events directly from a child element of a Component, we need to specify the <code>element</code> option to
106 identify the Component property to add a DOM listener to:</p>
107
108 <pre><code>new Ext.panel.Panel({
109     width: 400,
110     height: 200,
111     dockedItems: [{
112         xtype: 'toolbar'
113     }],
114     listeners: {
115         click: {
116             element: 'el', //bind to the underlying el property on the panel
117             fn: function(){ console.log('click el'); }
118         },
119         dblclick: {
120             element: 'body', //bind to the underlying body property on the panel
121             fn: function(){ console.log('dblclick body'); }
122         }
123     }
124 });
125 </code></pre>
126
127
128 <p></p></p>
129 </div></div></div><div id="config-model" class="member inherited"><a href="Ext.data.DirectStore.html#config-model" rel="config-model" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-model" class="viewSource">view source</a></div><a name="model"></a><a name="config-model"></a><a href="Ext.data.DirectStore.html#" rel="config-model" class="cls expand">model</a><span> : String</span></div><div class="description"><div class="short"><p>The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> associated with this store</p>
130 </div><div class="long"><p>The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> associated with this store</p>
131 </div></div></div><div id="config-proxy" class="member inherited"><a href="Ext.data.DirectStore.html#config-proxy" rel="config-proxy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-proxy" class="viewSource">view source</a></div><a name="proxy"></a><a name="config-proxy"></a><a href="Ext.data.DirectStore.html#" rel="config-proxy" class="cls expand">proxy</a><span> : String/Ext.data.proxy.Proxy/Object</span></div><div class="description"><div class="short">The Proxy to use for this Store. This can be either a string, a config
132 object or a Proxy instance - see setProxy for ...</div><div class="long"><p>The Proxy to use for this Store. This can be either a string, a config
133 object or a Proxy instance - see <a href="Ext.data.DirectStore.html#setProxy" rel="Ext.data.DirectStore#setProxy" class="docClass">setProxy</a> for details.</p>
134 </div></div></div><div id="config-purgePageCount" class="member inherited"><a href="Ext.data.DirectStore.html#config-purgePageCount" rel="config-purgePageCount" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-purgePageCount" class="viewSource">view source</a></div><a name="purgePageCount"></a><a name="config-purgePageCount"></a><a href="Ext.data.DirectStore.html#" rel="config-purgePageCount" class="cls expand">purgePageCount</a><span> : Number</span></div><div class="description"><div class="short">The number of pages to keep in the cache before purging additional records. A value of 0 indicates to never purge the...</div><div class="long"><p>The number of pages to keep in the cache before purging additional records. A value of 0 indicates to never purge the prefetched data.
135 This option is only relevant when the <a href="Ext.data.DirectStore.html#buffered" rel="Ext.data.DirectStore#buffered" class="docClass">buffered</a> option is set to true.</p>
136 </div></div></div><div id="config-remoteFilter" class="member inherited"><a href="Ext.data.DirectStore.html#config-remoteFilter" rel="config-remoteFilter" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-remoteFilter" class="viewSource">view source</a></div><a name="remoteFilter"></a><a name="config-remoteFilter"></a><a href="Ext.data.DirectStore.html#" rel="config-remoteFilter" class="cls expand">remoteFilter</a><span> : Boolean</span></div><div class="description"><div class="short">True to defer any filtering operation to the server. If false, filtering is done locally on the client. Defaults to f...</div><div class="long"><p>True to defer any filtering operation to the server. If false, filtering is done locally on the client. Defaults to <tt>false</tt>.</p>
137 </div></div></div><div id="config-remoteGroup" class="member inherited"><a href="Ext.data.DirectStore.html#config-remoteGroup" rel="config-remoteGroup" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-remoteGroup" class="viewSource">view source</a></div><a name="remoteGroup"></a><a name="config-remoteGroup"></a><a href="Ext.data.DirectStore.html#" rel="config-remoteGroup" class="cls expand">remoteGroup</a><span> : Boolean</span></div><div class="description"><div class="short">True if the grouping should apply on the server side, false if it is local only (defaults to false).  If the
138 grouping...</div><div class="long"><p>True if the grouping should apply on the server side, false if it is local only (defaults to false).  If the
139 grouping is local, it can be applied immediately to the data.  If it is remote, then it will simply act as a
140 helper, automatically sending the grouping information to the server.</p>
141 </div></div></div><div id="config-remoteSort" class="member inherited"><a href="Ext.data.DirectStore.html#config-remoteSort" rel="config-remoteSort" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-remoteSort" class="viewSource">view source</a></div><a name="remoteSort"></a><a name="config-remoteSort"></a><a href="Ext.data.DirectStore.html#" rel="config-remoteSort" class="cls expand">remoteSort</a><span> : Boolean</span></div><div class="description"><div class="short"><p>True to defer any sorting operation to the server. If false, sorting is done locally on the client. Defaults to <tt>false</tt>.</p>
142 </div><div class="long"><p>True to defer any sorting operation to the server. If false, sorting is done locally on the client. Defaults to <tt>false</tt>.</p>
143 </div></div></div><div id="config-sortOnFilter" class="member inherited"><a href="Ext.data.DirectStore.html#config-sortOnFilter" rel="config-sortOnFilter" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-cfg-sortOnFilter" class="viewSource">view source</a></div><a name="sortOnFilter"></a><a name="config-sortOnFilter"></a><a href="Ext.data.DirectStore.html#" rel="config-sortOnFilter" class="cls expand">sortOnFilter</a><span> : Boolean</span></div><div class="description"><div class="short">For local filtering only, causes sort to be called whenever filter is called,
144 causing the sorters to be reapplied aft...</div><div class="long"><p>For local filtering only, causes <a href="Ext.data.DirectStore.html#sort" rel="Ext.data.DirectStore#sort" class="docClass">sort</a> to be called whenever <a href="Ext.data.DirectStore.html#filter" rel="Ext.data.DirectStore#filter" class="docClass">filter</a> is called,
145 causing the sorters to be reapplied after filtering. Defaults to true</p>
146 </div></div></div><div id="config-storeId" class="member inherited"><a href="Ext.data.DirectStore.html#config-storeId" rel="config-storeId" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-cfg-storeId" class="viewSource">view source</a></div><a name="storeId"></a><a name="config-storeId"></a><a href="Ext.data.DirectStore.html#" rel="config-storeId" class="cls expand">storeId</a><span> : String</span></div><div class="description"><div class="short">Optional unique identifier for this store. If present, this Store will be registered with
147 the Ext.data.StoreManager, ...</div><div class="long"><p>Optional unique identifier for this store. If present, this Store will be registered with
148 the <a href="Ext.data.StoreManager.html" rel="Ext.data.StoreManager" class="docClass">Ext.data.StoreManager</a>, making it easy to reuse elsewhere. Defaults to undefined.</p>
149 </div></div></div></div><div class="m-properties"><a name="properties"></a><div class="definedBy">Defined By</div><h3 class="prp p">Properties</h3><div id="property-" class="member f inherited"><a href="Ext.data.DirectStore.html#property-" rel="property-" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-property-" class="viewSource">view source</a></div><a></a><a name="property-"></a><a href="Ext.data.DirectStore.html#" rel="property-" class="cls expand"></a><span> : Object</span></div><div class="description"><div class="short">Loop over each record returned from the server. Assume they are
150 returned in order of how they were sent. If we find a...</div><div class="long"><p>Loop over each record returned from the server. Assume they are
151 returned in order of how they were sent. If we find a matching
152 record, replace it with the newly created one.</p>
153 </div></div></div><div id="property-batchUpdateMode" class="member inherited"><a href="Ext.data.DirectStore.html#property-batchUpdateMode" rel="property-batchUpdateMode" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-property-batchUpdateMode" class="viewSource">view source</a></div><a name="batchUpdateMode"></a><a name="property-batchUpdateMode"></a><a href="Ext.data.DirectStore.html#" rel="property-batchUpdateMode" class="cls expand">batchUpdateMode</a><span> : String</span></div><div class="description"><div class="short">Sets the updating behavior based on batch synchronization. 'operation' (the default) will update the Store's
154 internal...</div><div class="long"><p>Sets the updating behavior based on batch synchronization. 'operation' (the default) will update the Store's
155 internal representation of the data after each operation of the batch has completed, 'complete' will wait until
156 the entire batch has been completed before updating the Store's data. 'complete' is a good choice for local
157 storage proxies, 'operation' is better for remote proxies, where there is a comparatively high latency.</p>
158 </div></div></div><div id="property-currentPage" class="member inherited"><a href="Ext.data.DirectStore.html#property-currentPage" rel="property-currentPage" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-property-currentPage" class="viewSource">view source</a></div><a name="currentPage"></a><a name="property-currentPage"></a><a href="Ext.data.DirectStore.html#" rel="property-currentPage" class="cls expand">currentPage</a><span> : Number</span></div><div class="description"><div class="short"><p>The page that the Store has most recently loaded (see <a href="Ext.data.DirectStore.html#loadPage" rel="Ext.data.DirectStore#loadPage" class="docClass">loadPage</a>)</p>
159 </div><div class="long"><p>The page that the Store has most recently loaded (see <a href="Ext.data.DirectStore.html#loadPage" rel="Ext.data.DirectStore#loadPage" class="docClass">loadPage</a>)</p>
160 </div></div></div><div id="property-data" class="member inherited"><a href="Ext.data.DirectStore.html#property-data" rel="property-data" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-property-data" class="viewSource">view source</a></div><a name="data"></a><a name="property-data"></a><a href="Ext.data.DirectStore.html#" rel="property-data" class="cls expand">data</a><span> : Ext.util.MixedCollection</span></div><div class="description"><div class="short"><p>The MixedCollection that holds this store's local cache of records</p>
161 </div><div class="long"><p>The MixedCollection that holds this store's local cache of records</p>
162 </div></div></div><div id="property-defaultProxyType" class="member inherited"><a href="Ext.data.DirectStore.html#property-defaultProxyType" rel="property-defaultProxyType" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-property-defaultProxyType" class="viewSource">view source</a></div><a name="defaultProxyType"></a><a name="property-defaultProxyType"></a><a href="Ext.data.DirectStore.html#" rel="property-defaultProxyType" class="cls expand">defaultProxyType</a><span> : String</span></div><div class="description"><div class="short"><p>The string type of the Proxy to create if none is specified. This defaults to creating a <a href="Ext.data.proxy.Memory.html" rel="Ext.data.proxy.Memory" class="docClass">memory proxy</a>.</p>
163 </div><div class="long"><p>The string type of the Proxy to create if none is specified. This defaults to creating a <a href="Ext.data.proxy.Memory.html" rel="Ext.data.proxy.Memory" class="docClass">memory proxy</a>.</p>
164 </div></div></div><div id="property-defaultSortDirection" class="member inherited"><a href="Ext.data.DirectStore.html#property-defaultSortDirection" rel="property-defaultSortDirection" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Sortable.html" class="definedIn docClass">Ext.util.Sortable</a><br/><a href="../source/Sortable.html#Ext-util.Sortable-property-defaultSortDirection" class="viewSource">view source</a></div><a name="defaultSortDirection"></a><a name="property-defaultSortDirection"></a><a href="Ext.data.DirectStore.html#" rel="property-defaultSortDirection" class="cls expand">defaultSortDirection</a><span> : String</span></div><div class="description"><div class="short"><p>The default sort direction to use if one is not specified (defaults to "ASC")</p>
165 </div><div class="long"><p>The default sort direction to use if one is not specified (defaults to "ASC")</p>
166 </div></div></div><div id="property-filterOnLoad" class="member inherited"><a href="Ext.data.DirectStore.html#property-filterOnLoad" rel="property-filterOnLoad" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-property-filterOnLoad" class="viewSource">view source</a></div><a name="filterOnLoad"></a><a name="property-filterOnLoad"></a><a href="Ext.data.DirectStore.html#" rel="property-filterOnLoad" class="cls expand">filterOnLoad</a><span> : Boolean</span></div><div class="description"><div class="short">If true, any filters attached to this Store will be run after loading data, before the datachanged event is fired.
167 De...</div><div class="long"><p>If true, any filters attached to this Store will be run after loading data, before the datachanged event is fired.
168 Defaults to true, ignored if <a href="Ext.data.DirectStore.html#remoteFilter" rel="Ext.data.DirectStore#remoteFilter" class="docClass">remoteFilter</a> is true</p>
169 </div></div></div><div id="property-filters" class="member inherited"><a href="Ext.data.DirectStore.html#property-filters" rel="property-filters" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-property-filters" class="viewSource">view source</a></div><a name="filters"></a><a name="property-filters"></a><a href="Ext.data.DirectStore.html#" rel="property-filters" class="cls expand">filters</a><span> : Ext.util.MixedCollection</span></div><div class="description"><div class="short"><p>The collection of <a href="Ext.util.Filter.html" rel="Ext.util.Filter" class="docClass">Filters</a> currently applied to this Store</p>
170 </div><div class="long"><p>The collection of <a href="Ext.util.Filter.html" rel="Ext.util.Filter" class="docClass">Filters</a> currently applied to this Store</p>
171 </div></div></div><div id="property-groupDir" class="member inherited"><a href="Ext.data.DirectStore.html#property-groupDir" rel="property-groupDir" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-property-groupDir" class="viewSource">view source</a></div><a name="groupDir"></a><a name="property-groupDir"></a><a href="Ext.data.DirectStore.html#" rel="property-groupDir" class="cls expand">groupDir</a><span> : String</span></div><div class="description"><div class="short"><p>The direction in which sorting should be applied when grouping. Defaults to "ASC" - the other supported value is "DESC"</p>
172 </div><div class="long"><p>The direction in which sorting should be applied when grouping. Defaults to "ASC" - the other supported value is "DESC"</p>
173 </div></div></div><div id="property-groupField" class="member inherited"><a href="Ext.data.DirectStore.html#property-groupField" rel="property-groupField" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-property-groupField" class="viewSource">view source</a></div><a name="groupField"></a><a name="property-groupField"></a><a href="Ext.data.DirectStore.html#" rel="property-groupField" class="cls expand">groupField</a><span> : String</span></div><div class="description"><div class="short">The (optional) field by which to group data in the store. Internally, grouping is very similar to sorting - the
174 group...</div><div class="long"><p>The (optional) field by which to group data in the store. Internally, grouping is very similar to sorting - the
175 groupField and <a href="Ext.data.DirectStore.html#groupDir" rel="Ext.data.DirectStore#groupDir" class="docClass">groupDir</a> are injected as the first sorter (see <a href="Ext.data.DirectStore.html#sort" rel="Ext.data.DirectStore#sort" class="docClass">sort</a>). Stores support a single
176 level of grouping, and groups can be fetched via the <a href="Ext.data.DirectStore.html#getGroups" rel="Ext.data.DirectStore#getGroups" class="docClass">getGroups</a> method.</p>
177 </div></div></div><div id="property-groupers" class="member inherited"><a href="Ext.data.DirectStore.html#property-groupers" rel="property-groupers" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-property-groupers" class="viewSource">view source</a></div><a name="groupers"></a><a name="property-groupers"></a><a href="Ext.data.DirectStore.html#" rel="property-groupers" class="cls expand">groupers</a><span> : Ext.util.MixedCollection</span></div><div class="description"><div class="short"><p>The collection of <a href="Ext.util.Grouper.html" rel="Ext.util.Grouper" class="docClass">Groupers</a> currently applied to this Store</p>
178 </div><div class="long"><p>The collection of <a href="Ext.util.Grouper.html" rel="Ext.util.Grouper" class="docClass">Groupers</a> currently applied to this Store</p>
179 </div></div></div><div id="property-isDestroyed" class="member inherited"><a href="Ext.data.DirectStore.html#property-isDestroyed" rel="property-isDestroyed" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-property-isDestroyed" class="viewSource">view source</a></div><a name="isDestroyed"></a><a name="property-isDestroyed"></a><a href="Ext.data.DirectStore.html#" rel="property-isDestroyed" class="cls expand">isDestroyed</a><span> : Boolean</span></div><div class="description"><div class="short">True if the Store has already been destroyed via destroyStore. If this is true, the reference to Store should be dele...</div><div class="long"><p>True if the Store has already been destroyed via <a href="Ext.data.DirectStore.html#destroyStore" rel="Ext.data.DirectStore#destroyStore" class="docClass">destroyStore</a>. If this is true, the reference to Store should be deleted
180 as it will not function correctly any more.</p>
181 </div></div></div><div id="property-isSortable" class="member inherited"><a href="Ext.data.DirectStore.html#property-isSortable" rel="property-isSortable" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Sortable.html" class="definedIn docClass">Ext.util.Sortable</a><br/><a href="../source/Sortable.html#Ext-util.Sortable-property-isSortable" class="viewSource">view source</a></div><a name="isSortable"></a><a name="property-isSortable"></a><a href="Ext.data.DirectStore.html#" rel="property-isSortable" class="cls expand">isSortable</a><span> : Boolean</span></div><div class="description"><div class="short"><p>Flag denoting that this object is sortable. Always true.</p>
182 </div><div class="long"><p>Flag denoting that this object is sortable. Always true.</p>
183 </div></div></div><div id="property-pageSize" class="member inherited"><a href="Ext.data.DirectStore.html#property-pageSize" rel="property-pageSize" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-property-pageSize" class="viewSource">view source</a></div><a name="pageSize"></a><a name="property-pageSize"></a><a href="Ext.data.DirectStore.html#" rel="property-pageSize" class="cls expand">pageSize</a><span> : Number</span></div><div class="description"><div class="short">The number of records considered to form a 'page'. This is used to power the built-in
184 paging using the nextPage and p...</div><div class="long"><p>The number of records considered to form a 'page'. This is used to power the built-in
185 paging using the nextPage and previousPage functions. Defaults to 25.</p>
186 </div></div></div><div id="property-removeAll" class="member inherited"><a href="Ext.data.DirectStore.html#property-removeAll" rel="property-removeAll" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-property-removeAll" class="viewSource">view source</a></div><a name="removeAll"></a><a name="property-removeAll"></a><a href="Ext.data.DirectStore.html#" rel="property-removeAll" class="cls expand">removeAll</a><span> : Object</span></div><div class="description"><div class="short">Removes all records from the store. This method does a "fast remove",
187 individual remove events are not called. The cl...</div><div class="long"><p>Removes all records from the store. This method does a "fast remove",
188 individual remove events are not called. The <a href="Ext.data.DirectStore.html#clear" rel="Ext.data.DirectStore#clear" class="docClass">clear</a> event is
189 fired upon completion.</p>
190 </div></div></div><div id="property-snapshot" class="member inherited"><a href="Ext.data.DirectStore.html#property-snapshot" rel="property-snapshot" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-property-snapshot" class="viewSource">view source</a></div><a name="snapshot"></a><a name="property-snapshot"></a><a href="Ext.data.DirectStore.html#" rel="property-snapshot" class="cls expand">snapshot</a><span> : Ext.util.MixedCollection</span></div><div class="description"><div class="short">A pristine (unfiltered) collection of the records in this store. This is used to reinstate
191 records when a filter is r...</div><div class="long"><p>A pristine (unfiltered) collection of the records in this store. This is used to reinstate
192 records when a filter is removed or changed</p>
193 </div></div></div><div id="property-sortOnLoad" class="member inherited"><a href="Ext.data.DirectStore.html#property-sortOnLoad" rel="property-sortOnLoad" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-property-sortOnLoad" class="viewSource">view source</a></div><a name="sortOnLoad"></a><a name="property-sortOnLoad"></a><a href="Ext.data.DirectStore.html#" rel="property-sortOnLoad" class="cls expand">sortOnLoad</a><span> : Boolean</span></div><div class="description"><div class="short">If true, any sorters attached to this Store will be run after loading data, before the datachanged event is fired.
194 De...</div><div class="long"><p>If true, any sorters attached to this Store will be run after loading data, before the datachanged event is fired.
195 Defaults to true, igored if <a href="Ext.data.DirectStore.html#remoteSort" rel="Ext.data.DirectStore#remoteSort" class="docClass">remoteSort</a> is true</p>
196 </div></div></div><div id="property-sortRoot" class="member inherited"><a href="Ext.data.DirectStore.html#property-sortRoot" rel="property-sortRoot" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Sortable.html" class="definedIn docClass">Ext.util.Sortable</a><br/><a href="../source/Sortable.html#Ext-util.Sortable-property-sortRoot" class="viewSource">view source</a></div><a name="sortRoot"></a><a name="property-sortRoot"></a><a href="Ext.data.DirectStore.html#" rel="property-sortRoot" class="cls expand">sortRoot</a><span> : String</span></div><div class="description"><div class="short"><p>The property in each item that contains the data to sort. (defaults to null)</p>
197 </div><div class="long"><p>The property in each item that contains the data to sort. (defaults to null)</p>
198 </div></div></div><div id="property-sorters" class="member inherited"><a href="Ext.data.DirectStore.html#property-sorters" rel="property-sorters" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Sortable.html" class="definedIn docClass">Ext.util.Sortable</a><br/><a href="../source/Sortable.html#Ext-util.Sortable-property-sorters" class="viewSource">view source</a></div><a name="sorters"></a><a name="property-sorters"></a><a href="Ext.data.DirectStore.html#" rel="property-sorters" class="cls expand">sorters</a><span> : Ext.util.MixedCollection</span></div><div class="description"><div class="short"><p>The collection of <a href="Ext.util.Sorter.html" rel="Ext.util.Sorter" class="docClass">Sorters</a> currently applied to this Store</p>
199 </div><div class="long"><p>The collection of <a href="Ext.util.Sorter.html" rel="Ext.util.Sorter" class="docClass">Sorters</a> currently applied to this Store</p>
200 </div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-DirectStore" class="member f ni"><a href="Ext.data.DirectStore.html#method-DirectStore" rel="method-DirectStore" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.DirectStore.html" class="definedIn docClass">Ext.data.DirectStore</a><br/><a href="../source/DirectStore.html#Ext-data.DirectStore-method-constructor" class="viewSource">view source</a></div><a name="DirectStore"></a><a name="method-DirectStore"></a><a href="Ext.data.DirectStore.html#" rel="method-DirectStore" class="cls expand">DirectStore</a>(
201 <span class="pre">Object config</span>)
202  : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
203 <h3 class="pa">Parameters</h3><ul><li><span class="pre">config</span> : Object<div class="sub-desc">
204 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
205 </li></ul></div></div></div><div id="method-add" class="member inherited"><a href="Ext.data.DirectStore.html#method-add" rel="method-add" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-add" class="viewSource">view source</a></div><a name="add"></a><a name="method-add"></a><a href="Ext.data.DirectStore.html#" rel="method-add" class="cls expand">add</a>(
206 <span class="pre">Object data</span>)
207  : Array</div><div class="description"><div class="short">Adds Model instances to the Store by instantiating them based on a JavaScript object. When adding already-
208 instantiat...</div><div class="long"><p>Adds Model instances to the Store by instantiating them based on a JavaScript object. When adding already-
209 instantiated Models, use <a href="Ext.data.DirectStore.html#insert" rel="Ext.data.DirectStore#insert" class="docClass">insert</a> instead. The instances will be added at the end of the existing collection.
210 This method accepts either a single argument array of Model instances or any number of model instance arguments.
211 Sample usage:</p>
212
213 <pre><code>myStore.add({some: 'data'}, {some: 'other data'});
214 </code></pre>
215
216 <h3 class="pa">Parameters</h3><ul><li><span class="pre">data</span> : Object<div class="sub-desc"><p>The data for each model</p>
217 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Array</span>&nbsp; &nbsp;<p>The array of newly created model instances</p>
218 </li></ul></div></div></div><div id="method-addEvents" class="member inherited"><a href="Ext.data.DirectStore.html#method-addEvents" rel="method-addEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addEvents" class="viewSource">view source</a></div><a name="addEvents"></a><a name="method-addEvents"></a><a href="Ext.data.DirectStore.html#" rel="method-addEvents" class="cls expand">addEvents</a>(
219 <span class="pre">Object/String o, String </span>)
220  : void</div><div class="description"><div class="short"><p>Adds the specified events to the list of events which this Observable may fire.</p>
221 </div><div class="long"><p>Adds the specified events to the list of events which this Observable may fire.</p>
222 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Object/String<div class="sub-desc"><p>Either an object with event names as properties with a value of <code>true</code>
223 or the first event name string if multiple event names are being passed as separate parameters.</p>
224 </div></li><li><span class="pre"></span> : String<div class="sub-desc"><p>[additional] Optional additional event names if multiple event names are being passed as separate parameters.
225 Usage:</p>
226
227 <pre><code>this.addEvents('storeloaded', 'storecleared');
228 </code></pre>
229
230 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
231 </li></ul></div></div></div><div id="method-addListener" class="member inherited"><a href="Ext.data.DirectStore.html#method-addListener" rel="method-addListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addListener" class="viewSource">view source</a></div><a name="addListener"></a><a name="method-addListener"></a><a href="Ext.data.DirectStore.html#" rel="method-addListener" class="cls expand">addListener</a>(
232 <span class="pre">String eventName, Function handler, [Object scope], [Object options]</span>)
233  : void</div><div class="description"><div class="short"><p>Appends an event handler to this object.</p>
234 </div><div class="long"><p>Appends an event handler to this object.</p>
235 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to listen for. May also be an object who's property names are event names. See</p>
236 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The method the event invokes.</p>
237 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
238 <b>If omitted, defaults to the object which fired the event.</b></p>
239 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>(optional) An object containing handler configuration.
240 properties. This may contain any of the following properties:<ul>
241 <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
242 <b>If omitted, defaults to the object which fired the event.</b></div></li>
243 <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>
244 <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>
245 <li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an <a href="Ext.util.DelayedTask.html" rel="Ext.util.DelayedTask" class="docClass">Ext.util.DelayedTask</a> delayed
246 by the specified number of milliseconds. If the event fires again within that time, the original
247 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
248 <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>
249 if the event was bubbled up from a child Observable.</div></li>
250 <li><b>element</b> : String<div class="sub-desc"><b>This option is only valid for listeners bound to <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a>.</b>
251 The name of a Component property which references an element to add a listener to.</p>
252
253 <p>This option is useful during Component construction to add DOM event listeners to elements of <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a> which
254 will exist only after the Component is rendered. For example, to add a click listener to a Panel's body:
255 <pre><code>new Ext.panel.Panel({
256     title: 'The title',
257     listeners: {
258         click: this.handlePanelClick,
259         element: 'body'
260     }
261 });
262 </code></pre></p>
263
264
265 <p>When added in this way, the options available are the options applicable to <a href="Ext.core.Element.html#addListener" rel="Ext.core.Element#addListener" class="docClass">Ext.core.Element.addListener</a></p>
266
267
268 <p></div></li>
269 </ul><br></p>
270
271 <p>
272 <b>Combining Options</b><br>
273 Using the options argument, it is possible to combine different types of listeners:<br>
274 <br>
275 A delayed, one-time listener.
276 <pre><code>myPanel.on('hide', this.handleClick, this, {
277 single: true,
278 delay: 100
279 });</code></pre>
280 <p>
281 <b>Attaching multiple handlers in 1 call</b><br>
282 The method also allows for a single argument to be passed which is a config object containing properties
283 which specify multiple events. For example:
284 <pre><code>myGridPanel.on({
285     cellClick: this.onCellClick,
286     mouseover: this.onMouseOver,
287     mouseout: this.onMouseOut,
288     scope: this // Important. Ensure "this" is correct during handler execution
289 });
290 </code></pre>.
291 <p>
292
293 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
294 </li></ul></div></div></div><div id="method-addManagedListener" class="member inherited"><a href="Ext.data.DirectStore.html#method-addManagedListener" rel="method-addManagedListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addManagedListener" class="viewSource">view source</a></div><a name="addManagedListener"></a><a name="method-addManagedListener"></a><a href="Ext.data.DirectStore.html#" rel="method-addManagedListener" class="cls expand">addManagedListener</a>(
295 <span class="pre">Observable/Element item, Object/String ename, Function fn, Object scope, Object opt</span>)
296  : void</div><div class="description"><div class="short"><p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component
297 is destroyed.
298
299 </div><div class="long"><p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component
300 is destroyed.
301
302 <h3 class="pa">Parameters</h3><ul><li><span class="pre">item</span> : Observable/Element<div class="sub-desc"><p>The item to which to add a listener/listeners.</p>
303 </div></li><li><span class="pre">ename</span> : Object/String<div class="sub-desc"><p>The event name, or an object containing event name properties.</p>
304 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
305 is the handler function.</p>
306 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
307 is the scope (<code>this</code> reference) in which the handler function is executed.</p>
308 </div></li><li><span class="pre">opt</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
309 is the <a href="Ext.util.Observable.html#addListener" rel="Ext.util.Observable#addListener" class="docClass">addListener</a> options.</p>
310 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
311 </li></ul></div></div></div><div id="method-aggregate" class="member inherited"><a href="Ext.data.DirectStore.html#method-aggregate" rel="method-aggregate" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-aggregate" class="viewSource">view source</a></div><a name="aggregate"></a><a name="method-aggregate"></a><a href="Ext.data.DirectStore.html#" rel="method-aggregate" class="cls expand">aggregate</a>(
312 <span class="pre">Function fn, [Object scope], Boolean grouped, [Array args]</span>)
313  : Object</div><div class="description"><div class="short"><p>Runs the aggregate function for all the records in the store.</p>
314 </div><div class="long"><p>Runs the aggregate function for all the records in the store.</p>
315 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to execute. The function is called with a single parameter,
316 an array of records for that group.</p>
317 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope to execute the function in. Defaults to the store.</p>
318 </div></li><li><span class="pre">grouped</span> : Boolean<div class="sub-desc"><p>(Optional) True to perform the operation for each group
319 in the store. The value returned will be an object literal with the key being the group
320 name and the group average being the value. The grouped parameter is only honored if
321 the store has a groupField.</p>
322 </div></li><li><span class="pre">args</span> : Array<div class="sub-desc"><p>(optional) Any arguments to append to the function call</p>
323 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Object</span>&nbsp; &nbsp;<p>An object literal with the group names and their appropriate values.</p>
324 </li></ul></div></div></div><div id="method-average" class="member inherited"><a href="Ext.data.DirectStore.html#method-average" rel="method-average" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-average" class="viewSource">view source</a></div><a name="average"></a><a name="method-average"></a><a href="Ext.data.DirectStore.html#" rel="method-average" class="cls expand">average</a>(
325 <span class="pre">String field, Boolean grouped</span>)
326  : Mixed/undefined</div><div class="description"><div class="short"><p>Gets the average value in the store.</p>
327 </div><div class="long"><p>Gets the average value in the store.</p>
328 <h3 class="pa">Parameters</h3><ul><li><span class="pre">field</span> : String<div class="sub-desc"><p>The field in each record</p>
329 </div></li><li><span class="pre">grouped</span> : Boolean<div class="sub-desc"><p>(Optional) True to perform the operation for each group
330 in the store. The value returned will be an object literal with the key being the group
331 name and the group average being the value. The grouped parameter is only honored if
332 the store has a groupField.</p>
333 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Mixed/undefined</span>&nbsp; &nbsp;<p>The average value, if no items exist, 0.</p>
334 </li></ul></div></div></div><div id="method-capture" class="member inherited"><a href="Ext.data.DirectStore.html#method-capture" rel="method-capture" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-capture" class="viewSource">view source</a></div><a name="capture"></a><a name="method-capture"></a><a href="Ext.data.DirectStore.html#" rel="method-capture" class="cls expand">capture</a>(
335 <span class="pre">Observable o, Function fn, [Object scope]</span>)
336  : void</div><div class="description"><div class="short">Starts capture on the specified Observable. All events will be passed
337 to the supplied function with the event name + ...</div><div class="long"><p>Starts capture on the specified Observable. All events will be passed
338 to the supplied function with the event name + standard signature of the event
339 <b>before</b> the event is fired. If the supplied function returns false,
340 the event will not fire.</p>
341 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Observable<div class="sub-desc"><p>The Observable to capture events from.</p>
342 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to call when an event is fired.</p>
343 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the Observable firing the event.</p>
344 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
345 </li></ul></div></div></div><div id="method-clearFilter" class="member inherited"><a href="Ext.data.DirectStore.html#method-clearFilter" rel="method-clearFilter" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-clearFilter" class="viewSource">view source</a></div><a name="clearFilter"></a><a name="method-clearFilter"></a><a href="Ext.data.DirectStore.html#" rel="method-clearFilter" class="cls expand">clearFilter</a>(
346 <span class="pre">Boolean suppressEvent</span>)
347  : void</div><div class="description"><div class="short"><p>Revert to a view of the Record cache with no filtering applied.</p>
348 </div><div class="long"><p>Revert to a view of the Record cache with no filtering applied.</p>
349 <h3 class="pa">Parameters</h3><ul><li><span class="pre">suppressEvent</span> : Boolean<div class="sub-desc"><p>If <tt>true</tt> the filter is cleared silently without firing the
350 <a href="Ext.data.DirectStore.html#datachanged" rel="Ext.data.DirectStore#datachanged" class="docClass">datachanged</a> event.</p>
351 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
352 </li></ul></div></div></div><div id="method-clearGrouping" class="member inherited"><a href="Ext.data.DirectStore.html#method-clearGrouping" rel="method-clearGrouping" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-clearGrouping" class="viewSource">view source</a></div><a name="clearGrouping"></a><a name="method-clearGrouping"></a><a href="Ext.data.DirectStore.html#" rel="method-clearGrouping" class="cls expand">clearGrouping</a> : void</div><div class="description"><div class="short"><p>Clear any groupers in the store</p>
353 </div><div class="long"><p>Clear any groupers in the store</p>
354 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
355 </li></ul></div></div></div><div id="method-clearListeners" class="member inherited"><a href="Ext.data.DirectStore.html#method-clearListeners" rel="method-clearListeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-clearListeners" class="viewSource">view source</a></div><a name="clearListeners"></a><a name="method-clearListeners"></a><a href="Ext.data.DirectStore.html#" rel="method-clearListeners" class="cls expand">clearListeners</a> : void</div><div class="description"><div class="short"><p>Removes all listeners for this object including the managed listeners</p>
356 </div><div class="long"><p>Removes all listeners for this object including the managed listeners</p>
357 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
358 </li></ul></div></div></div><div id="method-clearManagedListeners" class="member inherited"><a href="Ext.data.DirectStore.html#method-clearManagedListeners" rel="method-clearManagedListeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-clearManagedListeners" class="viewSource">view source</a></div><a name="clearManagedListeners"></a><a name="method-clearManagedListeners"></a><a href="Ext.data.DirectStore.html#" rel="method-clearManagedListeners" class="cls expand">clearManagedListeners</a> : void</div><div class="description"><div class="short"><p>Removes all managed listeners for this object.</p>
359 </div><div class="long"><p>Removes all managed listeners for this object.</p>
360 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
361 </li></ul></div></div></div><div id="method-collect" class="member inherited"><a href="Ext.data.DirectStore.html#method-collect" rel="method-collect" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-collect" class="viewSource">view source</a></div><a name="collect"></a><a name="method-collect"></a><a href="Ext.data.DirectStore.html#" rel="method-collect" class="cls expand">collect</a>(
362 <span class="pre">String dataIndex, [Boolean allowNull], [Boolean bypassFilter]</span>)
363  : Array</div><div class="description"><div class="short"><p>Collects unique values for a particular dataIndex from this store.</p>
364 </div><div class="long"><p>Collects unique values for a particular dataIndex from this store.</p>
365 <h3 class="pa">Parameters</h3><ul><li><span class="pre">dataIndex</span> : String<div class="sub-desc"><p>The property to collect</p>
366 </div></li><li><span class="pre">allowNull</span> : Boolean<div class="sub-desc"><p>(optional) Pass true to allow null, undefined or empty string values</p>
367 </div></li><li><span class="pre">bypassFilter</span> : Boolean<div class="sub-desc"><p>(optional) Pass true to collect from all records, even ones which are filtered</p>
368 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Array</span>&nbsp; &nbsp;<p>An array of the unique values</p>
369 </li></ul></div></div></div><div id="method-count" class="member inherited"><a href="Ext.data.DirectStore.html#method-count" rel="method-count" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-count" class="viewSource">view source</a></div><a name="count"></a><a name="method-count"></a><a href="Ext.data.DirectStore.html#" rel="method-count" class="cls expand">count</a>(
370 <span class="pre">Boolean grouped</span>)
371  : Number</div><div class="description"><div class="short"><p>Gets the count of items in the store.</p>
372 </div><div class="long"><p>Gets the count of items in the store.</p>
373 <h3 class="pa">Parameters</h3><ul><li><span class="pre">grouped</span> : Boolean<div class="sub-desc"><p>(Optional) True to perform the operation for each group
374 in the store. The value returned will be an object literal with the key being the group
375 name and the count for each group being the value. The grouped parameter is only honored if
376 the store has a groupField.</p>
377 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>the count</p>
378 </li></ul></div></div></div><div id="method-each" class="member inherited"><a href="Ext.data.DirectStore.html#method-each" rel="method-each" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-each" class="viewSource">view source</a></div><a name="each"></a><a name="method-each"></a><a href="Ext.data.DirectStore.html#" rel="method-each" class="cls expand">each</a>(
379 <span class="pre">Function fn, [Object scope]</span>)
380  : void</div><div class="description"><div class="short"><p>Calls the specified function for each of the <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Records</a> in the cache.</p>
381 </div><div class="long"><p>Calls the specified function for each of the <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Records</a> in the cache.</p>
382 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to call. The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Record</a> is passed as the first parameter.
383 Returning <tt>false</tt> aborts and exits the iteration.</p>
384 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed.
385 Defaults to the current <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Record</a> in the iteration.</p>
386 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
387 </li></ul></div></div></div><div id="method-enableBubble" class="member inherited"><a href="Ext.data.DirectStore.html#method-enableBubble" rel="method-enableBubble" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-enableBubble" class="viewSource">view source</a></div><a name="enableBubble"></a><a name="method-enableBubble"></a><a href="Ext.data.DirectStore.html#" rel="method-enableBubble" class="cls expand">enableBubble</a>(
388 <span class="pre">String/Array events</span>)
389  : void</div><div class="description"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
390 this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
391 <code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
392
393
394 <p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="Ext.Component.html#getBubbleTarget" rel="Ext.Component#getBubbleTarget" class="docClass">Ext.Component.getBubbleTarget</a>. The default
395 implementation in <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> returns the Component's immediate owner. But if a known target is required, this can be overridden to
396 access the required target more quickly.</p>
397
398
399 <p>Example:</p>
400
401
402 <pre><code>Ext.override(Ext.form.field.Base, {
403 //  Add functionality to Field&#39;s initComponent to enable the change event to bubble
404 initComponent : Ext.Function.createSequence(Ext.form.field.Base.prototype.initComponent, function() {
405     this.enableBubble('change');
406 }),
407
408 //  We know that we want Field&#39;s events to bubble directly to the FormPanel.
409 getBubbleTarget : function() {
410     if (!this.formPanel) {
411         this.formPanel = this.findParentByType('form');
412     }
413     return this.formPanel;
414 }
415 });
416
417 var myForm = new Ext.formPanel({
418 title: 'User Details',
419 items: [{
420     ...
421 }],
422 listeners: {
423     change: function() {
424         // Title goes red if form has been modified.
425         myForm.header.setStyle('color', 'red');
426     }
427 }
428 });
429 </code></pre>
430
431 <h3 class="pa">Parameters</h3><ul><li><span class="pre">events</span> : String/Array<div class="sub-desc"><p>The event name to bubble, or an Array of event names.</p>
432 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
433 </li></ul></div></div></div><div id="method-filter" class="member inherited"><a href="Ext.data.DirectStore.html#method-filter" rel="method-filter" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-filter" class="viewSource">view source</a></div><a name="filter"></a><a name="method-filter"></a><a href="Ext.data.DirectStore.html#" rel="method-filter" class="cls expand">filter</a>(
434 <span class="pre">Mixed filters, String value</span>)
435  : void</div><div class="description"><div class="short"><p>Filters the loaded set of records by a given set of filters.</p>
436 </div><div class="long"><p>Filters the loaded set of records by a given set of filters.</p>
437 <h3 class="pa">Parameters</h3><ul><li><span class="pre">filters</span> : Mixed<div class="sub-desc"><p>The set of filters to apply to the data. These are stored internally on the store,
438 but the filtering itself is done on the Store's <a href="Ext.util.MixedCollection.html" rel="Ext.util.MixedCollection" class="docClass">MixedCollection</a>. See
439 MixedCollection's <a href="Ext.util.MixedCollection.html#filter" rel="Ext.util.MixedCollection#filter" class="docClass">filter</a> method for filter syntax. Alternatively,
440 pass in a property string</p>
441 </div></li><li><span class="pre">value</span> : String<div class="sub-desc"><p>Optional value to filter by (only if using a property string as the first argument)</p>
442 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
443 </li></ul></div></div></div><div id="method-filterBy" class="member inherited"><a href="Ext.data.DirectStore.html#method-filterBy" rel="method-filterBy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-filterBy" class="viewSource">view source</a></div><a name="filterBy"></a><a name="method-filterBy"></a><a href="Ext.data.DirectStore.html#" rel="method-filterBy" class="cls expand">filterBy</a>(
444 <span class="pre">Function fn, [Object scope]</span>)
445  : void</div><div class="description"><div class="short">Filter by a function. The specified function will be called for each
446 Record in this Store. If the function returns tr...</div><div class="long"><p>Filter by a function. The specified function will be called for each
447 Record in this Store. If the function returns <tt>true</tt> the Record is included,
448 otherwise it is filtered out.</p>
449 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to be called. It will be passed the following parameters:<ul>
450 <li><b>record</b> : Ext.data.Model<p class="sub-desc">The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">record</a>
451 to test for filtering. Access field values using <a href="Ext.data.Model.html#get" rel="Ext.data.Model#get" class="docClass">Ext.data.Model.get</a>.</p></li>
452 <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
453 </ul></p>
454 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to this Store.</p>
455 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
456 </li></ul></div></div></div><div id="method-find" class="member inherited"><a href="Ext.data.DirectStore.html#method-find" rel="method-find" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-find" class="viewSource">view source</a></div><a name="find"></a><a name="method-find"></a><a href="Ext.data.DirectStore.html#" rel="method-find" class="cls expand">find</a>(
457 <span class="pre">String fieldName, String/RegExp value, [Number startIndex], [Boolean anyMatch], [Boolean caseSensitive], Boolean exactMatch</span>)
458  : Number</div><div class="description"><div class="short"><p>Finds the index of the first matching Record in this store by a specific field value.</p>
459 </div><div class="long"><p>Finds the index of the first matching Record in this store by a specific field value.</p>
460 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fieldName</span> : String<div class="sub-desc"><p>The name of the Record field to test.</p>
461 </div></li><li><span class="pre">value</span> : String/RegExp<div class="sub-desc"><p>Either a string that the field value
462 should begin with, or a RegExp to test against the field.</p>
463 </div></li><li><span class="pre">startIndex</span> : Number<div class="sub-desc"><p>(optional) The index to start searching at</p>
464 </div></li><li><span class="pre">anyMatch</span> : Boolean<div class="sub-desc"><p>(optional) True to match any part of the string, not just the beginning</p>
465 </div></li><li><span class="pre">caseSensitive</span> : Boolean<div class="sub-desc"><p>(optional) True for case sensitive comparison</p>
466 </div></li><li><span class="pre">exactMatch</span> : Boolean<div class="sub-desc"><p>True to force exact match (^ and $ characters added to the regex). Defaults to false.</p>
467 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The matched index or -1</p>
468 </li></ul></div></div></div><div id="method-findBy" class="member inherited"><a href="Ext.data.DirectStore.html#method-findBy" rel="method-findBy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-findBy" class="viewSource">view source</a></div><a name="findBy"></a><a name="method-findBy"></a><a href="Ext.data.DirectStore.html#" rel="method-findBy" class="cls expand">findBy</a>(
469 <span class="pre">Function fn, [Object scope], [Number startIndex]</span>)
470  : Number</div><div class="description"><div class="short">Find the index of the first matching Record in this Store by a function.
471 If the function returns true it is considere...</div><div class="long"><p>Find the index of the first matching Record in this Store by a function.
472 If the function returns <tt>true</tt> it is considered a match.</p>
473 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to be called. It will be passed the following parameters:<ul>
474 <li><b>record</b> : Ext.data.Model<p class="sub-desc">The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">record</a>
475 to test for filtering. Access field values using <a href="Ext.data.Model.html#get" rel="Ext.data.Model#get" class="docClass">Ext.data.Model.get</a>.</p></li>
476 <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
477 </ul></p>
478 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to this Store.</p>
479 </div></li><li><span class="pre">startIndex</span> : Number<div class="sub-desc"><p>(optional) The index to start searching at</p>
480 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The matched index or -1</p>
481 </li></ul></div></div></div><div id="method-findExact" class="member inherited"><a href="Ext.data.DirectStore.html#method-findExact" rel="method-findExact" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-findExact" class="viewSource">view source</a></div><a name="findExact"></a><a name="method-findExact"></a><a href="Ext.data.DirectStore.html#" rel="method-findExact" class="cls expand">findExact</a>(
482 <span class="pre">String fieldName, Mixed value, [Number startIndex]</span>)
483  : Number</div><div class="description"><div class="short"><p>Finds the index of the first matching Record in this store by a specific field value.</p>
484 </div><div class="long"><p>Finds the index of the first matching Record in this store by a specific field value.</p>
485 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fieldName</span> : String<div class="sub-desc"><p>The name of the Record field to test.</p>
486 </div></li><li><span class="pre">value</span> : Mixed<div class="sub-desc"><p>The value to match the field against.</p>
487 </div></li><li><span class="pre">startIndex</span> : Number<div class="sub-desc"><p>(optional) The index to start searching at</p>
488 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The matched index or -1</p>
489 </li></ul></div></div></div><div id="method-findRecord" class="member inherited"><a href="Ext.data.DirectStore.html#method-findRecord" rel="method-findRecord" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-findRecord" class="viewSource">view source</a></div><a name="findRecord"></a><a name="method-findRecord"></a><a href="Ext.data.DirectStore.html#" rel="method-findRecord" class="cls expand">findRecord</a>(
490 <span class="pre">String fieldName, String/RegExp value, [Number startIndex], [Boolean anyMatch], [Boolean caseSensitive], Boolean exactMatch</span>)
491  : Ext.data.Model</div><div class="description"><div class="short"><p>Finds the first matching Record in this store by a specific field value.</p>
492 </div><div class="long"><p>Finds the first matching Record in this store by a specific field value.</p>
493 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fieldName</span> : String<div class="sub-desc"><p>The name of the Record field to test.</p>
494 </div></li><li><span class="pre">value</span> : String/RegExp<div class="sub-desc"><p>Either a string that the field value
495 should begin with, or a RegExp to test against the field.</p>
496 </div></li><li><span class="pre">startIndex</span> : Number<div class="sub-desc"><p>(optional) The index to start searching at</p>
497 </div></li><li><span class="pre">anyMatch</span> : Boolean<div class="sub-desc"><p>(optional) True to match any part of the string, not just the beginning</p>
498 </div></li><li><span class="pre">caseSensitive</span> : Boolean<div class="sub-desc"><p>(optional) True for case sensitive comparison</p>
499 </div></li><li><span class="pre">exactMatch</span> : Boolean<div class="sub-desc"><p>True to force exact match (^ and $ characters added to the regex). Defaults to false.</p>
500 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Model</span>&nbsp; &nbsp;<p>The matched record or null</p>
501 </li></ul></div></div></div><div id="method-fireEvent" class="member inherited"><a href="Ext.data.DirectStore.html#method-fireEvent" rel="method-fireEvent" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-fireEvent" class="viewSource">view source</a></div><a name="fireEvent"></a><a name="method-fireEvent"></a><a href="Ext.data.DirectStore.html#" rel="method-fireEvent" class="cls expand">fireEvent</a>(
502 <span class="pre">String eventName, Object... args</span>)
503  : Boolean</div><div class="description"><div class="short">Fires the specified event with the passed parameters (minus the event name).
504
505
506 An event may be set to bubble up an Ob...</div><div class="long"><p>Fires the specified event with the passed parameters (minus the event name).</p>
507
508
509 <p>An event may be set to bubble up an Observable parent hierarchy (See <a href="Ext.Component.html#getBubbleTarget" rel="Ext.Component#getBubbleTarget" class="docClass">Ext.Component.getBubbleTarget</a>)
510 by calling <a href="Ext.data.DirectStore.html#enableBubble" rel="Ext.data.DirectStore#enableBubble" class="docClass">enableBubble</a>.</p>
511
512 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to fire.</p>
513 </div></li><li><span class="pre">args</span> : Object...<div class="sub-desc"><p>Variable number of parameters are passed to handlers.</p>
514 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>returns false if any of the handlers return false otherwise it returns true.</p>
515 </li></ul></div></div></div><div id="method-first" class="member inherited"><a href="Ext.data.DirectStore.html#method-first" rel="method-first" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-first" class="viewSource">view source</a></div><a name="first"></a><a name="method-first"></a><a href="Ext.data.DirectStore.html#" rel="method-first" class="cls expand">first</a>(
516 <span class="pre">Boolean grouped</span>)
517  : Ext.data.Model/undefined</div><div class="description"><div class="short"><p>Convenience function for getting the first model instance in the store</p>
518 </div><div class="long"><p>Convenience function for getting the first model instance in the store</p>
519 <h3 class="pa">Parameters</h3><ul><li><span class="pre">grouped</span> : Boolean<div class="sub-desc"><p>(Optional) True to perform the operation for each group
520 in the store. The value returned will be an object literal with the key being the group
521 name and the first record being the value. The grouped parameter is only honored if
522 the store has a groupField.</p>
523 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Model/undefined</span>&nbsp; &nbsp;<p>The first model instance in the store, or undefined</p>
524 </li></ul></div></div></div><div id="method-getAt" class="member inherited"><a href="Ext.data.DirectStore.html#method-getAt" rel="method-getAt" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-getAt" class="viewSource">view source</a></div><a name="getAt"></a><a name="method-getAt"></a><a href="Ext.data.DirectStore.html#" rel="method-getAt" class="cls expand">getAt</a>(
525 <span class="pre">Number index</span>)
526  : Ext.data.Model</div><div class="description"><div class="short"><p>Get the Record at the specified index.</p>
527 </div><div class="long"><p>Get the Record at the specified index.</p>
528 <h3 class="pa">Parameters</h3><ul><li><span class="pre">index</span> : Number<div class="sub-desc"><p>The index of the Record to find.</p>
529 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Model</span>&nbsp; &nbsp;<p>The Record at the passed index. Returns undefined if not found.</p>
530 </li></ul></div></div></div><div id="method-getById" class="member inherited"><a href="Ext.data.DirectStore.html#method-getById" rel="method-getById" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-getById" class="viewSource">view source</a></div><a name="getById"></a><a name="method-getById"></a><a href="Ext.data.DirectStore.html#" rel="method-getById" class="cls expand">getById</a>(
531 <span class="pre">String id</span>)
532  : Ext.data.Model</div><div class="description"><div class="short"><p>Get the Record with the specified id.</p>
533 </div><div class="long"><p>Get the Record with the specified id.</p>
534 <h3 class="pa">Parameters</h3><ul><li><span class="pre">id</span> : String<div class="sub-desc"><p>The id of the Record to find.</p>
535 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Model</span>&nbsp; &nbsp;<p>The Record with the passed id. Returns undefined if not found.</p>
536 </li></ul></div></div></div><div id="method-getCount" class="member inherited"><a href="Ext.data.DirectStore.html#method-getCount" rel="method-getCount" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-getCount" class="viewSource">view source</a></div><a name="getCount"></a><a name="method-getCount"></a><a href="Ext.data.DirectStore.html#" rel="method-getCount" class="cls expand">getCount</a> : Number</div><div class="description"><div class="short">Gets the number of cached records.
537
538 If using paging, this may not be the total size of the dataset. If the data objec...</div><div class="long"><p>Gets the number of cached records.</p>
539
540 <p>If using paging, this may not be the total size of the dataset. If the data object
541 used by the Reader contains the dataset size, then the <a href="Ext.data.DirectStore.html#getTotalCount" rel="Ext.data.DirectStore#getTotalCount" class="docClass">getTotalCount</a> function returns
542 the dataset size.  <b>Note</b>: see the Important note in <a href="Ext.data.DirectStore.html#load" rel="Ext.data.DirectStore#load" class="docClass">load</a>.</p>
543
544 <h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The number of Records in the Store's cache.</p>
545 </li></ul></div></div></div><div id="method-getGroupString" class="member inherited"><a href="Ext.data.DirectStore.html#method-getGroupString" rel="method-getGroupString" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-getGroupString" class="viewSource">view source</a></div><a name="getGroupString"></a><a name="method-getGroupString"></a><a href="Ext.data.DirectStore.html#" rel="method-getGroupString" class="cls expand">getGroupString</a>(
546 <span class="pre">Ext.data.Model instance</span>)
547  : String</div><div class="description"><div class="short">Returns the string to group on for a given model instance. The default implementation of this method returns
548 the mode...</div><div class="long"><p>Returns the string to group on for a given model instance. The default implementation of this method returns
549 the model's <a href="Ext.data.DirectStore.html#groupField" rel="Ext.data.DirectStore#groupField" class="docClass">groupField</a>, but this can be overridden to group by an arbitrary string. For example, to
550 group by the first letter of a model's 'name' field, use the following code:</p>
551
552
553 <pre><code>new Ext.data.Store({
554     groupDir: 'ASC',
555     getGroupString: function(instance) {
556         return instance.get('name')[0];
557     }
558 });
559 </code></pre>
560
561 <h3 class="pa">Parameters</h3><ul><li><span class="pre">instance</span> : Ext.data.Model<div class="sub-desc"><p>The model instance</p>
562 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">String</span>&nbsp; &nbsp;<p>The string to compare when forming groups</p>
563 </li></ul></div></div></div><div id="method-getGroups" class="member inherited"><a href="Ext.data.DirectStore.html#method-getGroups" rel="method-getGroups" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-getGroups" class="viewSource">view source</a></div><a name="getGroups"></a><a name="method-getGroups"></a><a href="Ext.data.DirectStore.html#" rel="method-getGroups" class="cls expand">getGroups</a>(
564 <span class="pre">String groupName</span>)
565  : Array</div><div class="description"><div class="short">Returns an object containing the result of applying grouping to the records in this store. See groupField,
566 groupDir a...</div><div class="long"><p>Returns an object containing the result of applying grouping to the records in this store. See <a href="Ext.data.DirectStore.html#groupField" rel="Ext.data.DirectStore#groupField" class="docClass">groupField</a>,
567 <a href="Ext.data.DirectStore.html#groupDir" rel="Ext.data.DirectStore#groupDir" class="docClass">groupDir</a> and <a href="Ext.data.DirectStore.html#getGroupString" rel="Ext.data.DirectStore#getGroupString" class="docClass">getGroupString</a>. Example for a store containing records with a color field:</p>
568
569 <pre><code>var myStore = new Ext.data.Store({
570     groupField: 'color',
571     groupDir  : 'DESC'
572 });
573
574 myStore.getGroups(); //returns:
575 [
576     {
577         name: 'yellow',
578         children: [
579             //all records where the color field is 'yellow'
580         ]
581     },
582     {
583         name: 'red',
584         children: [
585             //all records where the color field is 'red'
586         ]
587     }
588 ]
589 </code></pre>
590
591 <h3 class="pa">Parameters</h3><ul><li><span class="pre">groupName</span> : String<div class="sub-desc"><p>(Optional) Pass in an optional groupName argument to access a specific group as defined by <a href="Ext.data.DirectStore.html#getGroupString" rel="Ext.data.DirectStore#getGroupString" class="docClass">getGroupString</a></p>
592 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Array</span>&nbsp; &nbsp;<p>The grouped data</p>
593 </li></ul></div></div></div><div id="method-getNewRecords" class="member inherited"><a href="Ext.data.DirectStore.html#method-getNewRecords" rel="method-getNewRecords" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-method-getNewRecords" class="viewSource">view source</a></div><a name="getNewRecords"></a><a name="method-getNewRecords"></a><a href="Ext.data.DirectStore.html#" rel="method-getNewRecords" class="cls expand">getNewRecords</a> : Array</div><div class="description"><div class="short">Returns all Model instances that are either currently a phantom (e.g. have no id), or have an ID but have not
594 yet bee...</div><div class="long"><p>Returns all Model instances that are either currently a phantom (e.g. have no id), or have an ID but have not
595 yet been saved on this Store (this happens when adding a non-phantom record from another Store into this one)</p>
596 <h3 class="pa">Returns</h3><ul><li><span class="pre">Array</span>&nbsp; &nbsp;<p>The Model instances</p>
597 </li></ul></div></div></div><div id="method-getPageFromRecordIndex" class="member inherited"><a href="Ext.data.DirectStore.html#method-getPageFromRecordIndex" rel="method-getPageFromRecordIndex" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-getPageFromRecordIndex" class="viewSource">view source</a></div><a name="getPageFromRecordIndex"></a><a name="method-getPageFromRecordIndex"></a><a href="Ext.data.DirectStore.html#" rel="method-getPageFromRecordIndex" class="cls expand">getPageFromRecordIndex</a>(
598 <span class="pre">Number index</span>)
599  : Number</div><div class="description"><div class="short"><p>Determines the page from a record index</p>
600 </div><div class="long"><p>Determines the page from a record index</p>
601 <h3 class="pa">Parameters</h3><ul><li><span class="pre">index</span> : Number<div class="sub-desc"><p>The record index</p>
602 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The page the record belongs to</p>
603 </li></ul></div></div></div><div id="method-getProxy" class="member inherited"><a href="Ext.data.DirectStore.html#method-getProxy" rel="method-getProxy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-method-getProxy" class="viewSource">view source</a></div><a name="getProxy"></a><a name="method-getProxy"></a><a href="Ext.data.DirectStore.html#" rel="method-getProxy" class="cls expand">getProxy</a> : Ext.data.proxy.Proxy</div><div class="description"><div class="short"><p>Returns the proxy currently attached to this proxy instance</p>
604 </div><div class="long"><p>Returns the proxy currently attached to this proxy instance</p>
605 <h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.proxy.Proxy</span>&nbsp; &nbsp;<p>The Proxy instance</p>
606 </li></ul></div></div></div><div id="method-getRange" class="member inherited"><a href="Ext.data.DirectStore.html#method-getRange" rel="method-getRange" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-getRange" class="viewSource">view source</a></div><a name="getRange"></a><a name="method-getRange"></a><a href="Ext.data.DirectStore.html#" rel="method-getRange" class="cls expand">getRange</a>(
607 <span class="pre">[Number startIndex], [Number endIndex]</span>)
608  : Ext.data.Model[]</div><div class="description"><div class="short"><p>Returns a range of Records between specified indices.</p>
609 </div><div class="long"><p>Returns a range of Records between specified indices.</p>
610 <h3 class="pa">Parameters</h3><ul><li><span class="pre">startIndex</span> : Number<div class="sub-desc"><p>(optional) The starting index (defaults to 0)</p>
611 </div></li><li><span class="pre">endIndex</span> : Number<div class="sub-desc"><p>(optional) The ending index (defaults to the last Record in the Store)</p>
612 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Model[]</span>&nbsp; &nbsp;<p>An array of Records</p>
613 </li></ul></div></div></div><div id="method-getSortState" class="member inherited"><a href="Ext.data.DirectStore.html#method-getSortState" rel="method-getSortState" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Sortable.html" class="definedIn docClass">Ext.util.Sortable</a><br/><a href="../source/Sortable.html#Ext-util.Sortable-method-getSortState" class="viewSource">view source</a></div><a name="getSortState"></a><a name="method-getSortState"></a><a href="Ext.data.DirectStore.html#" rel="method-getSortState" class="cls expand">getSortState</a> : Object</div><div class="description"><div class="short"><p>Returns an object describing the current sort state of this Store.</p>
614 </div><div class="long"><p>Returns an object describing the current sort state of this Store.</p>
615 <h3 class="pa">Returns</h3><ul><li><span class="pre">Object</span>&nbsp; &nbsp;<p>The sort state of the Store. An object with two properties:<ul>
616 <li><b>field</b> : String<p class="sub-desc">The name of the field by which the Records are sorted.</p></li>
617 <li><b>direction</b> : String<p class="sub-desc">The sort order, 'ASC' or 'DESC' (case-sensitive).</p></li>
618 </ul>
619 See <tt><a href="Ext.data.DirectStore.html#sortInfo" rel="Ext.data.DirectStore#sortInfo" class="docClass">sortInfo</a></tt> for additional details.</p>
620 </li></ul></div></div></div><div id="method-getTotalCount" class="member inherited"><a href="Ext.data.DirectStore.html#method-getTotalCount" rel="method-getTotalCount" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-getTotalCount" class="viewSource">view source</a></div><a name="getTotalCount"></a><a name="method-getTotalCount"></a><a href="Ext.data.DirectStore.html#" rel="method-getTotalCount" class="cls expand">getTotalCount</a> : Number</div><div class="description"><div class="short">Returns the total number of Model instances that the Proxy
621 indicates exist. This will usually differ from getCount wh...</div><div class="long"><p>Returns the total number of <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a> instances that the <a href="Ext.data.proxy.Proxy.html" rel="Ext.data.proxy.Proxy" class="docClass">Proxy</a>
622 indicates exist. This will usually differ from <a href="Ext.data.DirectStore.html#getCount" rel="Ext.data.DirectStore#getCount" class="docClass">getCount</a> when using paging - getCount returns the
623 number of records loaded into the Store at the moment, getTotalCount returns the number of records that
624 could be loaded into the Store if the Store contained all data</p>
625 <h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The total number of Model instances available via the Proxy</p>
626 </li></ul></div></div></div><div id="method-getUpdatedRecords" class="member inherited"><a href="Ext.data.DirectStore.html#method-getUpdatedRecords" rel="method-getUpdatedRecords" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-method-getUpdatedRecords" class="viewSource">view source</a></div><a name="getUpdatedRecords"></a><a name="method-getUpdatedRecords"></a><a href="Ext.data.DirectStore.html#" rel="method-getUpdatedRecords" class="cls expand">getUpdatedRecords</a> : Array</div><div class="description"><div class="short"><p>Returns all Model instances that have been updated in the Store but not yet synchronized with the Proxy</p>
627 </div><div class="long"><p>Returns all Model instances that have been updated in the Store but not yet synchronized with the Proxy</p>
628 <h3 class="pa">Returns</h3><ul><li><span class="pre">Array</span>&nbsp; &nbsp;<p>The updated Model instances</p>
629 </li></ul></div></div></div><div id="method-group" class="member inherited"><a href="Ext.data.DirectStore.html#method-group" rel="method-group" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-group" class="viewSource">view source</a></div><a name="group"></a><a name="method-group"></a><a href="Ext.data.DirectStore.html#" rel="method-group" class="cls expand">group</a>(
630 <span class="pre">String|Array groupers, String direction</span>)
631  : void</div><div class="description"><div class="short"><p>Group data in the store</p>
632 </div><div class="long"><p>Group data in the store</p>
633 <h3 class="pa">Parameters</h3><ul><li><span class="pre">groupers</span> : String|Array<div class="sub-desc"><p>Either a string name of one of the fields in this Store's configured <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a>,
634 or an Array of grouper configurations.</p>
635 </div></li><li><span class="pre">direction</span> : String<div class="sub-desc"><p>The overall direction to group the data by. Defaults to "ASC".</p>
636 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
637 </li></ul></div></div></div><div id="method-guaranteeRange" class="member inherited"><a href="Ext.data.DirectStore.html#method-guaranteeRange" rel="method-guaranteeRange" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-guaranteeRange" class="viewSource">view source</a></div><a name="guaranteeRange"></a><a name="method-guaranteeRange"></a><a href="Ext.data.DirectStore.html#" rel="method-guaranteeRange" class="cls expand">guaranteeRange</a>(
638 <span class="pre">Object start, Object end, Object cb, Object scope</span>)
639  : void</div><div class="description"><div class="short">Guarantee a specific range, this will load the store with a range (that
640 must be the pageSize or smaller) and take car...</div><div class="long"><p>Guarantee a specific range, this will load the store with a range (that
641 must be the pageSize or smaller) and take care of any loading that may
642 be necessary.</p>
643 <h3 class="pa">Parameters</h3><ul><li><span class="pre">start</span> : Object<div class="sub-desc">
644 </div></li><li><span class="pre">end</span> : Object<div class="sub-desc">
645 </div></li><li><span class="pre">cb</span> : Object<div class="sub-desc">
646 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc">
647 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
648 </li></ul></div></div></div><div id="method-hasListener" class="member inherited"><a href="Ext.data.DirectStore.html#method-hasListener" rel="method-hasListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-hasListener" class="viewSource">view source</a></div><a name="hasListener"></a><a name="method-hasListener"></a><a href="Ext.data.DirectStore.html#" rel="method-hasListener" class="cls expand">hasListener</a>(
649 <span class="pre">String eventName</span>)
650  : Boolean</div><div class="description"><div class="short"><p>Checks to see if this object has any listeners for a specified event</p>
651 </div><div class="long"><p>Checks to see if this object has any listeners for a specified event</p>
652 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to check for</p>
653 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the event is being listened for, else false</p>
654 </li></ul></div></div></div><div id="method-hasPendingRequests" class="member inherited"><a href="Ext.data.DirectStore.html#method-hasPendingRequests" rel="method-hasPendingRequests" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-hasPendingRequests" class="viewSource">view source</a></div><a name="hasPendingRequests"></a><a name="method-hasPendingRequests"></a><a href="Ext.data.DirectStore.html#" rel="method-hasPendingRequests" class="cls expand">hasPendingRequests</a> : void</div><div class="description"><div class="short"><p>Returns the number of pending requests out.</p>
655 </div><div class="long"><p>Returns the number of pending requests out.</p>
656 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
657 </li></ul></div></div></div><div id="method-indexOf" class="member inherited"><a href="Ext.data.DirectStore.html#method-indexOf" rel="method-indexOf" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-indexOf" class="viewSource">view source</a></div><a name="indexOf"></a><a name="method-indexOf"></a><a href="Ext.data.DirectStore.html#" rel="method-indexOf" class="cls expand">indexOf</a>(
658 <span class="pre">Ext.data.Model record</span>)
659  : Number</div><div class="description"><div class="short"><p>Get the index within the cache of the passed Record.</p>
660 </div><div class="long"><p>Get the index within the cache of the passed Record.</p>
661 <h3 class="pa">Parameters</h3><ul><li><span class="pre">record</span> : Ext.data.Model<div class="sub-desc"><p>The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> object to find.</p>
662 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The index of the passed Record. Returns -1 if not found.</p>
663 </li></ul></div></div></div><div id="method-indexOfId" class="member inherited"><a href="Ext.data.DirectStore.html#method-indexOfId" rel="method-indexOfId" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-indexOfId" class="viewSource">view source</a></div><a name="indexOfId"></a><a name="method-indexOfId"></a><a href="Ext.data.DirectStore.html#" rel="method-indexOfId" class="cls expand">indexOfId</a>(
664 <span class="pre">String id</span>)
665  : Number</div><div class="description"><div class="short"><p>Get the index within the cache of the Record with the passed id.</p>
666 </div><div class="long"><p>Get the index within the cache of the Record with the passed id.</p>
667 <h3 class="pa">Parameters</h3><ul><li><span class="pre">id</span> : String<div class="sub-desc"><p>The id of the Record to find.</p>
668 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The index of the Record. Returns -1 if not found.</p>
669 </li></ul></div></div></div><div id="method-indexOfTotal" class="member inherited"><a href="Ext.data.DirectStore.html#method-indexOfTotal" rel="method-indexOfTotal" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-indexOfTotal" class="viewSource">view source</a></div><a name="indexOfTotal"></a><a name="method-indexOfTotal"></a><a href="Ext.data.DirectStore.html#" rel="method-indexOfTotal" class="cls expand">indexOfTotal</a>(
670 <span class="pre">Ext.data.Model record</span>)
671  : Number</div><div class="description"><div class="short"><p>Get the index within the entire dataset. From 0 to the totalCount.</p>
672 </div><div class="long"><p>Get the index within the entire dataset. From 0 to the totalCount.</p>
673 <h3 class="pa">Parameters</h3><ul><li><span class="pre">record</span> : Ext.data.Model<div class="sub-desc"><p>The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> object to find.</p>
674 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The index of the passed Record. Returns -1 if not found.</p>
675 </li></ul></div></div></div><div id="method-initSortable" class="member inherited"><a href="Ext.data.DirectStore.html#method-initSortable" rel="method-initSortable" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Sortable.html" class="definedIn docClass">Ext.util.Sortable</a><br/><a href="../source/Sortable.html#Ext-util.Sortable-method-initSortable" class="viewSource">view source</a></div><a name="initSortable"></a><a name="method-initSortable"></a><a href="Ext.data.DirectStore.html#" rel="method-initSortable" class="cls expand">initSortable</a> : void</div><div class="description"><div class="short">Performs initialization of this mixin. Component classes using this mixin should call this method
676 during their own in...</div><div class="long"><p>Performs initialization of this mixin. Component classes using this mixin should call this method
677 during their own initialization.</p>
678 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
679 </li></ul></div></div></div><div id="method-insert" class="member inherited"><a href="Ext.data.DirectStore.html#method-insert" rel="method-insert" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-insert" class="viewSource">view source</a></div><a name="insert"></a><a name="method-insert"></a><a href="Ext.data.DirectStore.html#" rel="method-insert" class="cls expand">insert</a>(
680 <span class="pre">Number index, Ext.data.Model[] records</span>)
681  : void</div><div class="description"><div class="short"><p>Inserts Model instances into the Store at the given index and fires the <a href="Ext.data.DirectStore.html#add" rel="Ext.data.DirectStore#add" class="docClass">add</a> event.
682 See also <code><a href="Ext.data.DirectStore.html#add" rel="Ext.data.DirectStore#add" class="docClass">add</a></code>.</p>
683 </div><div class="long"><p>Inserts Model instances into the Store at the given index and fires the <a href="Ext.data.DirectStore.html#add" rel="Ext.data.DirectStore#add" class="docClass">add</a> event.
684 See also <code><a href="Ext.data.DirectStore.html#add" rel="Ext.data.DirectStore#add" class="docClass">add</a></code>.</p>
685 <h3 class="pa">Parameters</h3><ul><li><span class="pre">index</span> : Number<div class="sub-desc"><p>The start index at which to insert the passed Records.</p>
686 </div></li><li><span class="pre">records</span> : Ext.data.Model[]<div class="sub-desc"><p>An Array of <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> objects to add to the cache.</p>
687 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
688 </li></ul></div></div></div><div id="method-isFiltered" class="member inherited"><a href="Ext.data.DirectStore.html#method-isFiltered" rel="method-isFiltered" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-isFiltered" class="viewSource">view source</a></div><a name="isFiltered"></a><a name="method-isFiltered"></a><a href="Ext.data.DirectStore.html#" rel="method-isFiltered" class="cls expand">isFiltered</a> : Boolean</div><div class="description"><div class="short"><p>Returns true if this store is currently filtered</p>
689 </div><div class="long"><p>Returns true if this store is currently filtered</p>
690 <h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;
691 </li></ul></div></div></div><div id="method-isGrouped" class="member inherited"><a href="Ext.data.DirectStore.html#method-isGrouped" rel="method-isGrouped" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-isGrouped" class="viewSource">view source</a></div><a name="isGrouped"></a><a name="method-isGrouped"></a><a href="Ext.data.DirectStore.html#" rel="method-isGrouped" class="cls expand">isGrouped</a> : Boolean</div><div class="description"><div class="short"><p>Checks if the store is currently grouped</p>
692 </div><div class="long"><p>Checks if the store is currently grouped</p>
693 <h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the store is grouped.</p>
694 </li></ul></div></div></div><div id="method-isLoading" class="member inherited"><a href="Ext.data.DirectStore.html#method-isLoading" rel="method-isLoading" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-method-isLoading" class="viewSource">view source</a></div><a name="isLoading"></a><a name="method-isLoading"></a><a href="Ext.data.DirectStore.html#" rel="method-isLoading" class="cls expand">isLoading</a> : Boolean</div><div class="description"><div class="short"><p>Returns true if the Store is currently performing a load operation</p>
695 </div><div class="long"><p>Returns true if the Store is currently performing a load operation</p>
696 <h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the Store is currently loading</p>
697 </li></ul></div></div></div><div id="method-last" class="member inherited"><a href="Ext.data.DirectStore.html#method-last" rel="method-last" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-last" class="viewSource">view source</a></div><a name="last"></a><a name="method-last"></a><a href="Ext.data.DirectStore.html#" rel="method-last" class="cls expand">last</a>(
698 <span class="pre">Boolean grouped</span>)
699  : Ext.data.Model/undefined</div><div class="description"><div class="short"><p>Convenience function for getting the last model instance in the store</p>
700 </div><div class="long"><p>Convenience function for getting the last model instance in the store</p>
701 <h3 class="pa">Parameters</h3><ul><li><span class="pre">grouped</span> : Boolean<div class="sub-desc"><p>(Optional) True to perform the operation for each group
702 in the store. The value returned will be an object literal with the key being the group
703 name and the last record being the value. The grouped parameter is only honored if
704 the store has a groupField.</p>
705 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Model/undefined</span>&nbsp; &nbsp;<p>The last model instance in the store, or undefined</p>
706 </li></ul></div></div></div><div id="method-load" class="member inherited"><a href="Ext.data.DirectStore.html#method-load" rel="method-load" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-load" class="viewSource">view source</a></div><a name="load"></a><a name="method-load"></a><a href="Ext.data.DirectStore.html#" rel="method-load" class="cls expand">load</a>(
707 <span class="pre">Object/Function options</span>)
708  : void</div><div class="description"><div class="short">Loads data into the Store via the configured proxy. This uses the Proxy to make an
709 asynchronous call to whatever stor...</div><div class="long"><p>Loads data into the Store via the configured <a href="Ext.data.DirectStore.html#proxy" rel="Ext.data.DirectStore#proxy" class="docClass">proxy</a>. This uses the Proxy to make an
710 asynchronous call to whatever storage backend the Proxy uses, automatically adding the retrieved
711 instances into the Store and calling an optional callback if required. Example usage:</p>
712
713
714
715
716 <pre><code>store.load({
717     scope   : this,
718     callback: function(records, operation, success) {
719         //the <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">operation</a> object contains all of the details of the load operation
720         console.log(records);
721     }
722 });
723 </code></pre>
724
725
726
727
728 <p>If the callback scope does not need to be set, a function can simply be passed:</p>
729
730
731
732
733 <pre><code>store.load(function(records, operation, success) {
734     console.log('loaded records');
735 });
736 </code></pre>
737
738 <h3 class="pa">Parameters</h3><ul><li><span class="pre">options</span> : Object/Function<div class="sub-desc"><p>Optional config object, passed into the <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">Ext.data.Operation</a> object before loading.</p>
739 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
740 </li></ul></div></div></div><div id="method-loadData" class="member inherited"><a href="Ext.data.DirectStore.html#method-loadData" rel="method-loadData" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-loadData" class="viewSource">view source</a></div><a name="loadData"></a><a name="method-loadData"></a><a href="Ext.data.DirectStore.html#" rel="method-loadData" class="cls expand">loadData</a>(
741 <span class="pre">Array data, Boolean append</span>)
742  : void</div><div class="description"><div class="short"><p>Loads an array of data straight into the Store</p>
743 </div><div class="long"><p>Loads an array of data straight into the Store</p>
744 <h3 class="pa">Parameters</h3><ul><li><span class="pre">data</span> : Array<div class="sub-desc"><p>Array of data to load. Any non-model instances will be cast into model instances first</p>
745 </div></li><li><span class="pre">append</span> : Boolean<div class="sub-desc"><p>True to add the records to the existing records in the store, false to remove the old ones first</p>
746 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
747 </li></ul></div></div></div><div id="method-loadPage" class="member inherited"><a href="Ext.data.DirectStore.html#method-loadPage" rel="method-loadPage" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-loadPage" class="viewSource">view source</a></div><a name="loadPage"></a><a name="method-loadPage"></a><a href="Ext.data.DirectStore.html#" rel="method-loadPage" class="cls expand">loadPage</a>(
748 <span class="pre">Number page</span>)
749  : void</div><div class="description"><div class="short">Loads a given 'page' of data by setting the start and limit values appropriately. Internally this just causes a norma...</div><div class="long"><p>Loads a given 'page' of data by setting the start and limit values appropriately. Internally this just causes a normal
750 load operation, passing in calculated 'start' and 'limit' params</p>
751 <h3 class="pa">Parameters</h3><ul><li><span class="pre">page</span> : Number<div class="sub-desc"><p>The number of the page to load</p>
752 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
753 </li></ul></div></div></div><div id="method-loadRecords" class="member inherited"><a href="Ext.data.DirectStore.html#method-loadRecords" rel="method-loadRecords" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-loadRecords" class="viewSource">view source</a></div><a name="loadRecords"></a><a name="method-loadRecords"></a><a href="Ext.data.DirectStore.html#" rel="method-loadRecords" class="cls expand">loadRecords</a>(
754 <span class="pre">Array records, Object options</span>)
755  : void</div><div class="description"><div class="short">Loads an array of {@Ext.data.Model model} instances into the store, fires the datachanged event. This should only usu...</div><div class="long"><p>Loads an array of {@Ext.data.Model model} instances into the store, fires the datachanged event. This should only usually
756 be called internally when loading from the <a href="Ext.data.proxy.Proxy.html" rel="Ext.data.proxy.Proxy" class="docClass">Proxy</a>, when adding records manually use <a href="Ext.data.DirectStore.html#add" rel="Ext.data.DirectStore#add" class="docClass">add</a> instead</p>
757 <h3 class="pa">Parameters</h3><ul><li><span class="pre">records</span> : Array<div class="sub-desc"><p>The array of records to load</p>
758 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>{addRecords: true} to add these records to the existing records, false to remove the Store's existing records first</p>
759 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
760 </li></ul></div></div></div><div id="method-max" class="member inherited"><a href="Ext.data.DirectStore.html#method-max" rel="method-max" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-max" class="viewSource">view source</a></div><a name="max"></a><a name="method-max"></a><a href="Ext.data.DirectStore.html#" rel="method-max" class="cls expand">max</a>(
761 <span class="pre">String field, Boolean grouped</span>)
762  : Mixed/undefined</div><div class="description"><div class="short"><p>Gets the maximum value in the store.</p>
763 </div><div class="long"><p>Gets the maximum value in the store.</p>
764 <h3 class="pa">Parameters</h3><ul><li><span class="pre">field</span> : String<div class="sub-desc"><p>The field in each record</p>
765 </div></li><li><span class="pre">grouped</span> : Boolean<div class="sub-desc"><p>(Optional) True to perform the operation for each group
766 in the store. The value returned will be an object literal with the key being the group
767 name and the maximum in the group being the value. The grouped parameter is only honored if
768 the store has a groupField.</p>
769 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Mixed/undefined</span>&nbsp; &nbsp;<p>The maximum value, if no items exist, undefined.</p>
770 </li></ul></div></div></div><div id="method-min" class="member inherited"><a href="Ext.data.DirectStore.html#method-min" rel="method-min" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-min" class="viewSource">view source</a></div><a name="min"></a><a name="method-min"></a><a href="Ext.data.DirectStore.html#" rel="method-min" class="cls expand">min</a>(
771 <span class="pre">String field, Boolean grouped</span>)
772  : Mixed/undefined</div><div class="description"><div class="short"><p>Gets the minimum value in the store.</p>
773 </div><div class="long"><p>Gets the minimum value in the store.</p>
774 <h3 class="pa">Parameters</h3><ul><li><span class="pre">field</span> : String<div class="sub-desc"><p>The field in each record</p>
775 </div></li><li><span class="pre">grouped</span> : Boolean<div class="sub-desc"><p>(Optional) True to perform the operation for each group
776 in the store. The value returned will be an object literal with the key being the group
777 name and the minimum in the group being the value. The grouped parameter is only honored if
778 the store has a groupField.</p>
779 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Mixed/undefined</span>&nbsp; &nbsp;<p>The minimum value, if no items exist, undefined.</p>
780 </li></ul></div></div></div><div id="method-nextPage" class="member inherited"><a href="Ext.data.DirectStore.html#method-nextPage" rel="method-nextPage" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-nextPage" class="viewSource">view source</a></div><a name="nextPage"></a><a name="method-nextPage"></a><a href="Ext.data.DirectStore.html#" rel="method-nextPage" class="cls expand">nextPage</a> : void</div><div class="description"><div class="short"><p>Loads the next 'page' in the current data set</p>
781 </div><div class="long"><p>Loads the next 'page' in the current data set</p>
782 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
783 </li></ul></div></div></div><div id="method-observe" class="member inherited"><a href="Ext.data.DirectStore.html#method-observe" rel="method-observe" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-observe" class="viewSource">view source</a></div><a name="observe"></a><a name="method-observe"></a><a href="Ext.data.DirectStore.html#" rel="method-observe" class="cls expand">observe</a>(
784 <span class="pre">Function c, Object listeners</span>)
785  : void</div><div class="description"><div class="short">Sets observability on the passed class constructor.
786
787 This makes any event fired on any instance of the passed class a...</div><div class="long"><p>Sets observability on the passed class constructor.</p>
788
789 <p>This makes any event fired on any instance of the passed class also fire a single event through
790 the <strong>class</strong> allowing for central handling of events on many instances at once.</p>
791
792 <p>Usage:</p>
793
794 <pre><code>Ext.util.Observable.observe(Ext.data.Connection);
795 Ext.data.Connection.on('beforerequest', function(con, options) {
796     console.log('Ajax request made to ' + options.url);
797 });
798 </code></pre>
799 <h3 class="pa">Parameters</h3><ul><li><span class="pre">c</span> : Function<div class="sub-desc"><p>The class constructor to make observable.</p>
800 </div></li><li><span class="pre">listeners</span> : Object<div class="sub-desc"><p>An object containing a series of listeners to add. See <a href="Ext.data.DirectStore.html#addListener" rel="Ext.data.DirectStore#addListener" class="docClass">addListener</a>.</p>
801 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
802 </li></ul></div></div></div><div id="method-on" class="member inherited"><a href="Ext.data.DirectStore.html#method-on" rel="method-on" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-on" class="viewSource">view source</a></div><a name="on"></a><a name="method-on"></a><a href="Ext.data.DirectStore.html#" rel="method-on" class="cls expand">on</a>(
803 <span class="pre">String eventName, Function handler, [Object scope], [Object options]</span>)
804  : void</div><div class="description"><div class="short"><p>Appends an event handler to this object (shorthand for <a href="Ext.data.DirectStore.html#addListener" rel="Ext.data.DirectStore#addListener" class="docClass">addListener</a>.)</p>
805 </div><div class="long"><p>Appends an event handler to this object (shorthand for <a href="Ext.data.DirectStore.html#addListener" rel="Ext.data.DirectStore#addListener" class="docClass">addListener</a>.)</p>
806 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event to listen for</p>
807 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The method the event invokes</p>
808 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
809 <b>If omitted, defaults to the object which fired the event.</b></p>
810 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>(optional) An object containing handler configuration.</p>
811 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
812 </li></ul></div></div></div><div id="method-prefetch" class="member inherited"><a href="Ext.data.DirectStore.html#method-prefetch" rel="method-prefetch" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-prefetch" class="viewSource">view source</a></div><a name="prefetch"></a><a name="method-prefetch"></a><a href="Ext.data.DirectStore.html#" rel="method-prefetch" class="cls expand">prefetch</a>(
813 <span class="pre">Object options</span>)
814  : void</div><div class="description"><div class="short"><p>Prefetches data the Store using its configured <a href="Ext.data.DirectStore.html#proxy" rel="Ext.data.DirectStore#proxy" class="docClass">proxy</a>.</p>
815 </div><div class="long"><p>Prefetches data the Store using its configured <a href="Ext.data.DirectStore.html#proxy" rel="Ext.data.DirectStore#proxy" class="docClass">proxy</a>.</p>
816 <h3 class="pa">Parameters</h3><ul><li><span class="pre">options</span> : Object<div class="sub-desc"><p>Optional config object, passed into the <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">Ext.data.Operation</a> object before loading.
817 See <a href="Ext.data.DirectStore.html#load" rel="Ext.data.DirectStore#load" class="docClass">load</a></p>
818 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
819 </li></ul></div></div></div><div id="method-prefetchPage" class="member inherited"><a href="Ext.data.DirectStore.html#method-prefetchPage" rel="method-prefetchPage" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-prefetchPage" class="viewSource">view source</a></div><a name="prefetchPage"></a><a name="method-prefetchPage"></a><a href="Ext.data.DirectStore.html#" rel="method-prefetchPage" class="cls expand">prefetchPage</a>(
820 <span class="pre">Number page, Object options, Object </span>)
821  : void</div><div class="description"><div class="short"><p>Prefetches a page of data.</p>
822 </div><div class="long"><p>Prefetches a page of data.</p>
823 <h3 class="pa">Parameters</h3><ul><li><span class="pre">page</span> : Number<div class="sub-desc"><p>The page to prefetch</p>
824 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>Optional config object, passed into the <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">Ext.data.Operation</a> object before loading.
825 See <a href="Ext.data.DirectStore.html#load" rel="Ext.data.DirectStore#load" class="docClass">load</a></p>
826 </div></li><li><span class="pre"></span> : Object<div class="sub-desc">
827 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
828 </li></ul></div></div></div><div id="method-previousPage" class="member inherited"><a href="Ext.data.DirectStore.html#method-previousPage" rel="method-previousPage" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-previousPage" class="viewSource">view source</a></div><a name="previousPage"></a><a name="method-previousPage"></a><a href="Ext.data.DirectStore.html#" rel="method-previousPage" class="cls expand">previousPage</a> : void</div><div class="description"><div class="short"><p>Loads the previous 'page' in the current data set</p>
829 </div><div class="long"><p>Loads the previous 'page' in the current data set</p>
830 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
831 </li></ul></div></div></div><div id="method-purgeRecords" class="member inherited"><a href="Ext.data.DirectStore.html#method-purgeRecords" rel="method-purgeRecords" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-purgeRecords" class="viewSource">view source</a></div><a name="purgeRecords"></a><a name="method-purgeRecords"></a><a href="Ext.data.DirectStore.html#" rel="method-purgeRecords" class="cls expand">purgeRecords</a> : void</div><div class="description"><div class="short"><p>Purge the least recently used records in the prefetch if the purgeCount
832 has been exceeded.</p>
833 </div><div class="long"><p>Purge the least recently used records in the prefetch if the purgeCount
834 has been exceeded.</p>
835 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
836 </li></ul></div></div></div><div id="method-queryBy" class="member inherited"><a href="Ext.data.DirectStore.html#method-queryBy" rel="method-queryBy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-queryBy" class="viewSource">view source</a></div><a name="queryBy"></a><a name="method-queryBy"></a><a href="Ext.data.DirectStore.html#" rel="method-queryBy" class="cls expand">queryBy</a>(
837 <span class="pre">Function fn, [Object scope]</span>)
838  : MixedCollection</div><div class="description"><div class="short">Query the cached records in this Store using a filtering function. The specified function
839 will be called with each re...</div><div class="long"><p>Query the cached records in this Store using a filtering function. The specified function
840 will be called with each record in this Store. If the function returns <tt>true</tt> the record is
841 included in the results.</p>
842 <h3 class="pa">Parameters</h3><ul><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to be called. It will be passed the following parameters:<ul>
843 <li><b>record</b> : Ext.data.Model<p class="sub-desc">The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">record</a>
844 to test for filtering. Access field values using <a href="Ext.data.Model.html#get" rel="Ext.data.Model#get" class="docClass">Ext.data.Model.get</a>.</p></li>
845 <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
846 </ul></p>
847 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to this Store.</p>
848 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">MixedCollection</span>&nbsp; &nbsp;<p>Returns an <a href="Ext.util.MixedCollection.html" rel="Ext.util.MixedCollection" class="docClass">Ext.util.MixedCollection</a> of the matched records</p>
849 </li></ul></div></div></div><div id="method-relayEvents" class="member inherited"><a href="Ext.data.DirectStore.html#method-relayEvents" rel="method-relayEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-relayEvents" class="viewSource">view source</a></div><a name="relayEvents"></a><a name="method-relayEvents"></a><a href="Ext.data.DirectStore.html#" rel="method-relayEvents" class="cls expand">relayEvents</a>(
850 <span class="pre">Object origin, Array events, Object prefix</span>)
851  : void</div><div class="description"><div class="short"><p>Relays selected events from the specified Observable as if the events were fired by <code><b>this</b></code>.</p>
852 </div><div class="long"><p>Relays selected events from the specified Observable as if the events were fired by <code><b>this</b></code>.</p>
853 <h3 class="pa">Parameters</h3><ul><li><span class="pre">origin</span> : Object<div class="sub-desc"><p>The Observable whose events this object is to relay.</p>
854 </div></li><li><span class="pre">events</span> : Array<div class="sub-desc"><p>Array of event names to relay.</p>
855 </div></li><li><span class="pre">prefix</span> : Object<div class="sub-desc">
856 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
857 </li></ul></div></div></div><div id="method-releaseCapture" class="member inherited"><a href="Ext.data.DirectStore.html#method-releaseCapture" rel="method-releaseCapture" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-releaseCapture" class="viewSource">view source</a></div><a name="releaseCapture"></a><a name="method-releaseCapture"></a><a href="Ext.data.DirectStore.html#" rel="method-releaseCapture" class="cls expand">releaseCapture</a>(
858 <span class="pre">Observable o</span>)
859  : void</div><div class="description"><div class="short"><p>Removes <b>all</b> added captures from the Observable.</p>
860 </div><div class="long"><p>Removes <b>all</b> added captures from the Observable.</p>
861 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Observable<div class="sub-desc"><p>The Observable to release</p>
862 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
863 </li></ul></div></div></div><div id="method-remove" class="member inherited"><a href="Ext.data.DirectStore.html#method-remove" rel="method-remove" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-remove" class="viewSource">view source</a></div><a name="remove"></a><a name="method-remove"></a><a href="Ext.data.DirectStore.html#" rel="method-remove" class="cls expand">remove</a>(
864 <span class="pre">Ext.data.Model/Array records, Object isMove</span>)
865  : void</div><div class="description"><div class="short">Removes the given record from the Store, firing the 'remove' event for each instance that is removed, plus a single
866 '...</div><div class="long"><p>Removes the given record from the Store, firing the 'remove' event for each instance that is removed, plus a single
867 'datachanged' event after removal.</p>
868 <h3 class="pa">Parameters</h3><ul><li><span class="pre">records</span> : Ext.data.Model/Array<div class="sub-desc"><p>The <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Ext.data.Model</a> instance or array of instances to remove</p>
869 </div></li><li><span class="pre">isMove</span> : Object<div class="sub-desc">
870 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
871 </li></ul></div></div></div><div id="method-removeAll" class="member inherited"><a href="Ext.data.DirectStore.html#method-removeAll" rel="method-removeAll" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-removeAll" class="viewSource">view source</a></div><a name="removeAll"></a><a name="method-removeAll"></a><a href="Ext.data.DirectStore.html#" rel="method-removeAll" class="cls expand">removeAll</a>(
872 <span class="pre">Boolean silent</span>)
873  : void</div><div class="description"><div class="short"><p>Remove all items from the store.</p>
874 </div><div class="long"><p>Remove all items from the store.</p>
875 <h3 class="pa">Parameters</h3><ul><li><span class="pre">silent</span> : Boolean<div class="sub-desc"><p>Prevent the <code>clear</code> event from being fired.</p>
876 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
877 </li></ul></div></div></div><div id="method-removeAt" class="member inherited"><a href="Ext.data.DirectStore.html#method-removeAt" rel="method-removeAt" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-removeAt" class="viewSource">view source</a></div><a name="removeAt"></a><a name="method-removeAt"></a><a href="Ext.data.DirectStore.html#" rel="method-removeAt" class="cls expand">removeAt</a>(
878 <span class="pre">Number index</span>)
879  : void</div><div class="description"><div class="short"><p>Removes the model instance at the given index</p>
880 </div><div class="long"><p>Removes the model instance at the given index</p>
881 <h3 class="pa">Parameters</h3><ul><li><span class="pre">index</span> : Number<div class="sub-desc"><p>The record index</p>
882 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
883 </li></ul></div></div></div><div id="method-removeListener" class="member inherited"><a href="Ext.data.DirectStore.html#method-removeListener" rel="method-removeListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-removeListener" class="viewSource">view source</a></div><a name="removeListener"></a><a name="method-removeListener"></a><a href="Ext.data.DirectStore.html#" rel="method-removeListener" class="cls expand">removeListener</a>(
884 <span class="pre">String eventName, Function handler, [Object scope]</span>)
885  : void</div><div class="description"><div class="short"><p>Removes an event handler.</p>
886 </div><div class="long"><p>Removes an event handler.</p>
887 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event the handler was associated with.</p>
888 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The handler to remove. <b>This must be a reference to the function passed into the <a href="Ext.data.DirectStore.html#addListener" rel="Ext.data.DirectStore#addListener" class="docClass">addListener</a> call.</b></p>
889 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope originally specified for the handler.</p>
890 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
891 </li></ul></div></div></div><div id="method-removeManagedListener" class="member inherited"><a href="Ext.data.DirectStore.html#method-removeManagedListener" rel="method-removeManagedListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-removeManagedListener" class="viewSource">view source</a></div><a name="removeManagedListener"></a><a name="method-removeManagedListener"></a><a href="Ext.data.DirectStore.html#" rel="method-removeManagedListener" class="cls expand">removeManagedListener</a>(
892 <span class="pre">Observable|Element item, Object|String ename, Function fn, Object scope</span>)
893  : void</div><div class="description"><div class="short"><p>Removes listeners that were added by the <a href="Ext.data.DirectStore.html#mon" rel="Ext.data.DirectStore#mon" class="docClass">mon</a> method.</p>
894 </div><div class="long"><p>Removes listeners that were added by the <a href="Ext.data.DirectStore.html#mon" rel="Ext.data.DirectStore#mon" class="docClass">mon</a> method.</p>
895 <h3 class="pa">Parameters</h3><ul><li><span class="pre">item</span> : Observable|Element<div class="sub-desc"><p>The item from which to remove a listener/listeners.</p>
896 </div></li><li><span class="pre">ename</span> : Object|String<div class="sub-desc"><p>The event name, or an object containing event name properties.</p>
897 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
898 is the handler function.</p>
899 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
900 is the scope (<code>this</code> reference) in which the handler function is executed.</p>
901 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
902 </li></ul></div></div></div><div id="method-resumeEvents" class="member inherited"><a href="Ext.data.DirectStore.html#method-resumeEvents" rel="method-resumeEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-resumeEvents" class="viewSource">view source</a></div><a name="resumeEvents"></a><a name="method-resumeEvents"></a><a href="Ext.data.DirectStore.html#" rel="method-resumeEvents" class="cls expand">resumeEvents</a> : void</div><div class="description"><div class="short">Resume firing events. (see suspendEvents)
903 If events were suspended using the queueSuspended parameter, then all
904 event...</div><div class="long"><p>Resume firing events. (see <a href="Ext.data.DirectStore.html#suspendEvents" rel="Ext.data.DirectStore#suspendEvents" class="docClass">suspendEvents</a>)
905 If events were suspended using the <code><b>queueSuspended</b></code> parameter, then all
906 events fired during event suspension will be sent to any listeners now.</p>
907 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
908 </li></ul></div></div></div><div id="method-setProxy" class="member inherited"><a href="Ext.data.DirectStore.html#method-setProxy" rel="method-setProxy" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-method-setProxy" class="viewSource">view source</a></div><a name="setProxy"></a><a name="method-setProxy"></a><a href="Ext.data.DirectStore.html#" rel="method-setProxy" class="cls expand">setProxy</a>(
909 <span class="pre">String|Object|Ext.data.proxy.Proxy proxy</span>)
910  : Ext.data.proxy.Proxy</div><div class="description"><div class="short"><p>Sets the Store's Proxy by string, config object or Proxy instance</p>
911 </div><div class="long"><p>Sets the Store's Proxy by string, config object or Proxy instance</p>
912 <h3 class="pa">Parameters</h3><ul><li><span class="pre">proxy</span> : String|Object|Ext.data.proxy.Proxy<div class="sub-desc"><p>The new Proxy, which can be either a type string, a configuration object
913 or an <a href="Ext.data.proxy.Proxy.html" rel="Ext.data.proxy.Proxy" class="docClass">Ext.data.proxy.Proxy</a> instance</p>
914 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.proxy.Proxy</span>&nbsp; &nbsp;<p>The attached Proxy object</p>
915 </li></ul></div></div></div><div id="method-sort" class="member inherited"><a href="Ext.data.DirectStore.html#method-sort" rel="method-sort" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Sortable.html" class="definedIn docClass">Ext.util.Sortable</a><br/><a href="../source/Sortable.html#Ext-util.Sortable-method-sort" class="viewSource">view source</a></div><a name="sort"></a><a name="method-sort"></a><a href="Ext.data.DirectStore.html#" rel="method-sort" class="cls expand">sort</a>(
916 <span class="pre">String|Array sorters, String direction, Object where, Object doSort</span>)
917  : void</div><div class="description"><div class="short">Sorts the data in the Store by one or more of its properties. Example usage:
918
919
920 //sort by a single field
921 myStore.sort(...</div><div class="long"><p>Sorts the data in the Store by one or more of its properties. Example usage:</p>
922
923
924 <pre><code>//sort by a single field
925 myStore.sort('myField', 'DESC');
926
927 //sorting by multiple fields
928 myStore.sort([
929     {
930         property : 'age',
931         direction: 'ASC'
932     },
933     {
934         property : 'name',
935         direction: 'DESC'
936     }
937 ]);
938 </code></pre>
939
940
941 <p>Internally, Store converts the passed arguments into an array of <a href="Ext.util.Sorter.html" rel="Ext.util.Sorter" class="docClass">Ext.util.Sorter</a> instances, and delegates the actual
942 sorting to its internal <a href="Ext.util.MixedCollection.html" rel="Ext.util.MixedCollection" class="docClass">Ext.util.MixedCollection</a>.</p>
943
944
945 <p>When passing a single string argument to sort, Store maintains a ASC/DESC toggler per field, so this code:</p>
946
947
948 <pre><code>store.sort('myField');
949 store.sort('myField');
950      </code></pre>
951
952
953 <p>Is equivalent to this code, because Store handles the toggling automatically:</p>
954
955
956 <pre><code>store.sort('myField', 'ASC');
957 store.sort('myField', 'DESC');
958 </code></pre>
959
960 <h3 class="pa">Parameters</h3><ul><li><span class="pre">sorters</span> : String|Array<div class="sub-desc"><p>Either a string name of one of the fields in this Store's configured <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a>,
961 or an Array of sorter configurations.</p>
962 </div></li><li><span class="pre">direction</span> : String<div class="sub-desc"><p>The overall direction to sort the data by. Defaults to "ASC".</p>
963 </div></li><li><span class="pre">where</span> : Object<div class="sub-desc">
964 </div></li><li><span class="pre">doSort</span> : Object<div class="sub-desc">
965 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
966 </li></ul></div></div></div><div id="method-sum" class="member inherited"><a href="Ext.data.DirectStore.html#method-sum" rel="method-sum" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-method-sum" class="viewSource">view source</a></div><a name="sum"></a><a name="method-sum"></a><a href="Ext.data.DirectStore.html#" rel="method-sum" class="cls expand">sum</a>(
967 <span class="pre">String field, Boolean grouped</span>)
968  : Number</div><div class="description"><div class="short"><p>Sums the value of <tt>property</tt> for each <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">record</a> between <tt>start</tt>
969 and <tt>end</tt> and returns the result.</p>
970 </div><div class="long"><p>Sums the value of <tt>property</tt> for each <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">record</a> between <tt>start</tt>
971 and <tt>end</tt> and returns the result.</p>
972 <h3 class="pa">Parameters</h3><ul><li><span class="pre">field</span> : String<div class="sub-desc"><p>A field in each record</p>
973 </div></li><li><span class="pre">grouped</span> : Boolean<div class="sub-desc"><p>(Optional) True to perform the operation for each group
974 in the store. The value returned will be an object literal with the key being the group
975 name and the sum for that group being the value. The grouped parameter is only honored if
976 the store has a groupField.</p>
977 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Number</span>&nbsp; &nbsp;<p>The sum</p>
978 </li></ul></div></div></div><div id="method-suspendEvents" class="member inherited"><a href="Ext.data.DirectStore.html#method-suspendEvents" rel="method-suspendEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-suspendEvents" class="viewSource">view source</a></div><a name="suspendEvents"></a><a name="method-suspendEvents"></a><a href="Ext.data.DirectStore.html#" rel="method-suspendEvents" class="cls expand">suspendEvents</a>(
979 <span class="pre">Boolean queueSuspended</span>)
980  : void</div><div class="description"><div class="short"><p>Suspend the firing of all events. (see <a href="Ext.data.DirectStore.html#resumeEvents" rel="Ext.data.DirectStore#resumeEvents" class="docClass">resumeEvents</a>)</p>
981 </div><div class="long"><p>Suspend the firing of all events. (see <a href="Ext.data.DirectStore.html#resumeEvents" rel="Ext.data.DirectStore#resumeEvents" class="docClass">resumeEvents</a>)</p>
982 <h3 class="pa">Parameters</h3><ul><li><span class="pre">queueSuspended</span> : Boolean<div class="sub-desc"><p>Pass as true to queue up suspended events to be fired
983 after the <a href="Ext.data.DirectStore.html#resumeEvents" rel="Ext.data.DirectStore#resumeEvents" class="docClass">resumeEvents</a> call instead of discarding all suspended events;</p>
984 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
985 </li></ul></div></div></div><div id="method-sync" class="member inherited"><a href="Ext.data.DirectStore.html#method-sync" rel="method-sync" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-method-sync" class="viewSource">view source</a></div><a name="sync"></a><a name="method-sync"></a><a href="Ext.data.DirectStore.html#" rel="method-sync" class="cls expand">sync</a> : void</div><div class="description"><div class="short">Synchronizes the Store with its Proxy. This asks the Proxy to batch together any new, updated
986 and deleted records in ...</div><div class="long"><p>Synchronizes the Store with its Proxy. This asks the Proxy to batch together any new, updated
987 and deleted records in the store, updating the Store's internal representation of the records
988 as each operation completes.</p>
989 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
990 </li></ul></div></div></div><div id="method-un" class="member inherited"><a href="Ext.data.DirectStore.html#method-un" rel="method-un" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-un" class="viewSource">view source</a></div><a name="un"></a><a name="method-un"></a><a href="Ext.data.DirectStore.html#" rel="method-un" class="cls expand">un</a>(
991 <span class="pre">String eventName, Function handler, [Object scope]</span>)
992  : void</div><div class="description"><div class="short"><p>Removes an event handler (shorthand for <a href="Ext.data.DirectStore.html#removeListener" rel="Ext.data.DirectStore#removeListener" class="docClass">removeListener</a>.)</p>
993 </div><div class="long"><p>Removes an event handler (shorthand for <a href="Ext.data.DirectStore.html#removeListener" rel="Ext.data.DirectStore#removeListener" class="docClass">removeListener</a>.)</p>
994 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event the handler was associated with.</p>
995 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The handler to remove. <b>This must be a reference to the function passed into the <a href="Ext.data.DirectStore.html#addListener" rel="Ext.data.DirectStore#addListener" class="docClass">addListener</a> call.</b></p>
996 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope originally specified for the handler.</p>
997 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
998 </li></ul></div></div></div></div><div class="m-events"><a name="events"></a><div class="definedBy">Defined By</div><h3 class="evt p">Events</h3><div id="event-add" class="member f inherited"><a href="Ext.data.DirectStore.html#event-add" rel="event-add" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-event-add" class="viewSource">view source</a></div><a name="add"></a><a name="event-add"></a><a href="Ext.data.DirectStore.html#" rel="event-add" class="cls expand">add</a>(
999 <span class="pre">Ext.data.Store store, Array records, Number index</span>)
1000 </div><div class="description"><div class="short"><p>Fired when a Model instance has been added to this Store</p>
1001 </div><div class="long"><p>Fired when a Model instance has been added to this Store</p>
1002 <h3 class="pa">Parameters</h3><ul><li><span class="pre">store</span> : Ext.data.Store<div class="sub-desc"><p>The store</p>
1003 </div></li><li><span class="pre">records</span> : Array<div class="sub-desc"><p>The Model instances that were added</p>
1004 </div></li><li><span class="pre">index</span> : Number<div class="sub-desc"><p>The index at which the instances were inserted</p>
1005 </div></li></ul></div></div></div><div id="event-beforeload" class="member inherited"><a href="Ext.data.DirectStore.html#event-beforeload" rel="event-beforeload" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-event-beforeload" class="viewSource">view source</a></div><a name="beforeload"></a><a name="event-beforeload"></a><a href="Ext.data.DirectStore.html#" rel="event-beforeload" class="cls expand">beforeload</a>(
1006 <span class="pre">Ext.data.Store store, Ext.data.Operation operation</span>)
1007 </div><div class="description"><div class="short"><p>Event description</p>
1008 </div><div class="long"><p>Event description</p>
1009 <h3 class="pa">Parameters</h3><ul><li><span class="pre">store</span> : Ext.data.Store<div class="sub-desc"><p>This Store</p>
1010 </div></li><li><span class="pre">operation</span> : Ext.data.Operation<div class="sub-desc"><p>The <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">Ext.data.Operation</a> object that will be passed to the Proxy to load the Store</p>
1011 </div></li></ul></div></div></div><div id="event-beforeprefetch" class="member inherited"><a href="Ext.data.DirectStore.html#event-beforeprefetch" rel="event-beforeprefetch" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-event-beforeprefetch" class="viewSource">view source</a></div><a name="beforeprefetch"></a><a name="event-beforeprefetch"></a><a href="Ext.data.DirectStore.html#" rel="event-beforeprefetch" class="cls expand">beforeprefetch</a>(
1012 <span class="pre">Ext.data.store this, Ext.data.Operation operation</span>)
1013 </div><div class="description"><div class="short"><p>Fires before a prefetch occurs. Return false to cancel.</p>
1014 </div><div class="long"><p>Fires before a prefetch occurs. Return false to cancel.</p>
1015 <h3 class="pa">Parameters</h3><ul><li><span class="pre">this</span> : Ext.data.store<div class="sub-desc">
1016 </div></li><li><span class="pre">operation</span> : Ext.data.Operation<div class="sub-desc"><p>The associated operation</p>
1017 </div></li></ul></div></div></div><div id="event-beforesync" class="member inherited"><a href="Ext.data.DirectStore.html#event-beforesync" rel="event-beforesync" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-event-beforesync" class="viewSource">view source</a></div><a name="beforesync"></a><a name="event-beforesync"></a><a href="Ext.data.DirectStore.html#" rel="event-beforesync" class="cls expand">beforesync</a>(
1018 <span class="pre">Object options</span>)
1019 </div><div class="description"><div class="short"><p>Called before a call to <a href="Ext.data.DirectStore.html#sync" rel="Ext.data.DirectStore#sync" class="docClass">sync</a> is executed. Return false from any listener to cancel the synv</p>
1020 </div><div class="long"><p>Called before a call to <a href="Ext.data.DirectStore.html#sync" rel="Ext.data.DirectStore#sync" class="docClass">sync</a> is executed. Return false from any listener to cancel the synv</p>
1021 <h3 class="pa">Parameters</h3><ul><li><span class="pre">options</span> : Object<div class="sub-desc"><p>Hash of all records to be synchronized, broken down into create, update and destroy</p>
1022 </div></li></ul></div></div></div><div id="event-clear" class="member inherited"><a href="Ext.data.DirectStore.html#event-clear" rel="event-clear" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-event-clear" class="viewSource">view source</a></div><a name="clear"></a><a name="event-clear"></a><a href="Ext.data.DirectStore.html#" rel="event-clear" class="cls expand">clear</a>(
1023 <span class="pre">Ext.data.Store this</span>)
1024 </div><div class="description"><div class="short"><p>Fired after the <a href="Ext.data.DirectStore.html#removeAll" rel="Ext.data.DirectStore#removeAll" class="docClass">removeAll</a> method is called.</p>
1025 </div><div class="long"><p>Fired after the <a href="Ext.data.DirectStore.html#removeAll" rel="Ext.data.DirectStore#removeAll" class="docClass">removeAll</a> method is called.</p>
1026 <h3 class="pa">Parameters</h3><ul><li><span class="pre">this</span> : Ext.data.Store<div class="sub-desc">
1027 </div></li></ul></div></div></div><div id="event-datachanged" class="member inherited"><a href="Ext.data.DirectStore.html#event-datachanged" rel="event-datachanged" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-event-datachanged" class="viewSource">view source</a></div><a name="datachanged"></a><a name="event-datachanged"></a><a href="Ext.data.DirectStore.html#" rel="event-datachanged" class="cls expand">datachanged</a>(
1028 <span class="pre">Ext.data.Store this</span>)
1029 </div><div class="description"><div class="short">Fires whenever the records in the Store have changed in some way - this could include adding or removing records,
1030 or ...</div><div class="long"><p>Fires whenever the records in the Store have changed in some way - this could include adding or removing records,
1031 or updating the data in existing records</p>
1032 <h3 class="pa">Parameters</h3><ul><li><span class="pre">this</span> : Ext.data.Store<div class="sub-desc"><p>The data store</p>
1033 </div></li></ul></div></div></div><div id="event-groupchange" class="member inherited"><a href="Ext.data.DirectStore.html#event-groupchange" rel="event-groupchange" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-event-groupchange" class="viewSource">view source</a></div><a name="groupchange"></a><a name="event-groupchange"></a><a href="Ext.data.DirectStore.html#" rel="event-groupchange" class="cls expand">groupchange</a>(
1034 <span class="pre">Ext.data.Store store, Array groupers</span>)
1035 </div><div class="description"><div class="short"><p>Fired whenever the grouping in the grid changes</p>
1036 </div><div class="long"><p>Fired whenever the grouping in the grid changes</p>
1037 <h3 class="pa">Parameters</h3><ul><li><span class="pre">store</span> : Ext.data.Store<div class="sub-desc"><p>The store</p>
1038 </div></li><li><span class="pre">groupers</span> : Array<div class="sub-desc"><p>The array of grouper objects</p>
1039 </div></li></ul></div></div></div><div id="event-load" class="member inherited"><a href="Ext.data.DirectStore.html#event-load" rel="event-load" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.Store.html" class="definedIn docClass">Ext.data.Store</a><br/><a href="../source/Store2.html#Ext-data.Store-event-load" class="viewSource">view source</a></div><a name="load"></a><a name="event-load"></a><a href="Ext.data.DirectStore.html#" rel="event-load" class="cls expand">load</a>(
1040 <span class="pre">Ext.data.store this, Array records, Boolean successful, Ext.data.Operation operation</span>)
1041 </div><div class="description"><div class="short"><p>Fires whenever records have been prefetched</p>
1042 </div><div class="long"><p>Fires whenever records have been prefetched</p>
1043 <h3 class="pa">Parameters</h3><ul><li><span class="pre">this</span> : Ext.data.store<div class="sub-desc">
1044 </div></li><li><span class="pre">records</span> : Array<div class="sub-desc"><p>An array of records</p>
1045 </div></li><li><span class="pre">successful</span> : Boolean<div class="sub-desc"><p>True if the operation was successful.</p>
1046 </div></li><li><span class="pre">operation</span> : Ext.data.Operation<div class="sub-desc"><p>The associated operation</p>
1047 </div></li></ul></div></div></div><div id="event-remove" class="member inherited"><a href="Ext.data.DirectStore.html#event-remove" rel="event-remove" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-event-remove" class="viewSource">view source</a></div><a name="remove"></a><a name="event-remove"></a><a href="Ext.data.DirectStore.html#" rel="event-remove" class="cls expand">remove</a>(
1048 <span class="pre">Ext.data.Store store, Ext.data.Model record, Number index</span>)
1049 </div><div class="description"><div class="short"><p>Fired when a Model instance has been removed from this Store</p>
1050 </div><div class="long"><p>Fired when a Model instance has been removed from this Store</p>
1051 <h3 class="pa">Parameters</h3><ul><li><span class="pre">store</span> : Ext.data.Store<div class="sub-desc"><p>The Store object</p>
1052 </div></li><li><span class="pre">record</span> : Ext.data.Model<div class="sub-desc"><p>The record that was removed</p>
1053 </div></li><li><span class="pre">index</span> : Number<div class="sub-desc"><p>The index of the record that was removed</p>
1054 </div></li></ul></div></div></div><div id="event-update" class="member inherited"><a href="Ext.data.DirectStore.html#event-update" rel="event-update" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.AbstractStore.html" class="definedIn docClass">Ext.data.AbstractStore</a><br/><a href="../source/AbstractStore.html#Ext-data.AbstractStore-event-update" class="viewSource">view source</a></div><a name="update"></a><a name="event-update"></a><a href="Ext.data.DirectStore.html#" rel="event-update" class="cls expand">update</a>(
1055 <span class="pre">Store this, Ext.data.Model record, String operation</span>)
1056 </div><div class="description"><div class="short"><p>Fires when a Record has been updated</p>
1057 </div><div class="long"><p>Fires when a Record has been updated</p>
1058 <h3 class="pa">Parameters</h3><ul><li><span class="pre">this</span> : Store<div class="sub-desc">
1059 </div></li><li><span class="pre">record</span> : Ext.data.Model<div class="sub-desc"><p>The Model instance that was updated</p>
1060 </div></li><li><span class="pre">operation</span> : String<div class="sub-desc"><p>The update operation being performed. Value may be one of:</p>
1061
1062 <pre><code>               Ext.data.Model.EDIT
1063                Ext.data.Model.REJECT
1064                Ext.data.Model.COMMIT
1065 </code></pre>
1066
1067 </div></li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>