2 |
aperonnet |
1 |
<div class="body-wrap">
|
|
|
2 |
<div class="top-tools">
|
|
|
3 |
<a class="inner-link" href="#Ext.data.Store-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
|
|
|
4 |
<a class="inner-link" href="#Ext.data.Store-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
|
|
|
5 |
<a class="inner-link" href="#Ext.data.Store-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
|
|
|
6 |
<a class="inner-link" href="#Ext.data.Store-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
|
|
|
7 |
<a class="bookmark" href="../docs/?class=Ext.data.Store"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
|
|
|
8 |
</div>
|
|
|
9 |
<div class="inheritance res-block">
|
|
|
10 |
<pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
|
|
|
11 |
<img src="resources/elbow-end.gif"/>Store</pre></div>
|
|
|
12 |
<h1>Class Ext.data.Store</h1>
|
|
|
13 |
<table cellspacing="0">
|
|
|
14 |
<tr><td class="label">Package:</td><td class="hd-info">Ext.data</td></tr>
|
|
|
15 |
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/data/Store.js" target="_blank">Store.js</a></td></tr>
|
|
|
16 |
<tr><td class="label">Class:</td><td class="hd-info">Store</td></tr>
|
|
|
17 |
<tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.data.GroupingStore" href="output/Ext.data.GroupingStore.html">GroupingStore</a>, <a ext:cls="Ext.data.JsonStore" href="output/Ext.data.JsonStore.html">JsonStore</a>, <a ext:cls="Ext.data.SimpleStore" href="output/Ext.data.SimpleStore.html">SimpleStore</a></td></tr>
|
|
|
18 |
<tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>
|
|
|
19 |
</table>
|
|
|
20 |
<div class="description">
|
|
|
21 |
The Store class encapsulates a client side cache of <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Record</a>
|
|
|
22 |
objects which provide input data for Components such as the <a ext:cls="Ext.grid.GridPanel" href="output/Ext.grid.GridPanel.html">GridPanel</a>,
|
|
|
23 |
the <a ext:cls="Ext.form.ComboBox" href="output/Ext.form.ComboBox.html">ComboBox</a>, or the <a ext:cls="Ext.DataView" href="output/Ext.DataView.html">DataView</a></p>
|
|
|
24 |
<p>A Store object uses its <a ext:cls="Ext.data.Store" ext:member="proxy" href="output/Ext.data.Store.html#proxy">configured</a> implementation of <a ext:cls="Ext.data.DataProxy" href="output/Ext.data.DataProxy.html">DataProxy</a>
|
|
|
25 |
to access a data object unless you call <a ext:cls="Ext.data.Store" ext:member="loadData" href="output/Ext.data.Store.html#loadData">loadData</a> directly and pass in your data.</p>
|
|
|
26 |
<p>A Store object has no knowledge of the format of the data returned by the Proxy.</p>
|
|
|
27 |
<p>A Store object uses its <a ext:cls="Ext.data.Store" ext:member="reader" href="output/Ext.data.Store.html#reader">configured</a> implementation of <a ext:cls="Ext.data.DataReader" href="output/Ext.data.DataReader.html">DataReader</a>
|
|
|
28 |
to create <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Record</a> instances from the data object. These Records
|
|
|
29 |
are cached and made available through accessor functions.</p> </div>
|
|
|
30 |
|
|
|
31 |
<div class="hr"></div>
|
|
|
32 |
<a id="Ext.data.Store-configs"></a>
|
|
|
33 |
<h2>Config Options</h2>
|
|
|
34 |
<table cellspacing="0" class="member-table">
|
|
|
35 |
<tr>
|
|
|
36 |
<th class="sig-header" colspan="2">Config Options</th>
|
|
|
37 |
<th class="msource-header">Defined By</th>
|
|
|
38 |
</tr>
|
|
|
39 |
<tr class="config-row">
|
|
|
40 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
41 |
<td class="sig">
|
|
|
42 |
<a id="Ext.data.Store-autoLoad"></a>
|
|
|
43 |
<b>autoLoad</b> : Boolean/Object <div class="mdesc">
|
|
|
44 |
If passed, this store's load method is automatically called after creation with the autoLoad object </div>
|
|
|
45 |
</td>
|
|
|
46 |
<td class="msource">Store</td>
|
|
|
47 |
</tr>
|
|
|
48 |
<tr class="config-row alt">
|
|
|
49 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
50 |
<td class="sig">
|
|
|
51 |
<a id="Ext.data.Store-baseParams"></a>
|
|
|
52 |
<b>baseParams</b> : Object <div class="mdesc">
|
|
|
53 |
An object containing properties which are to be sent as parameters on any HTTP request </div>
|
|
|
54 |
</td>
|
|
|
55 |
<td class="msource">Store</td>
|
|
|
56 |
</tr>
|
|
|
57 |
<tr class="config-row">
|
|
|
58 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
59 |
<td class="sig">
|
|
|
60 |
<a id="Ext.data.Store-data"></a>
|
|
|
61 |
<b>data</b> : Array <div class="mdesc">
|
|
|
62 |
Inline data to be loaded when the store is initialized. </div>
|
|
|
63 |
</td>
|
|
|
64 |
<td class="msource">Store</td>
|
|
|
65 |
</tr>
|
|
|
66 |
<tr class="config-row inherited alt expandable">
|
|
|
67 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
68 |
<td class="sig">
|
|
|
69 |
<a id="Ext.data.Store-listeners"></a>
|
|
|
70 |
<b>listeners</b> : Object <div class="mdesc">
|
|
|
71 |
<div class="short">A config object containing one or more event handlers to be added to this object during initialization. This should b...</div>
|
|
|
72 |
<div class="long">
|
|
|
73 |
A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once. </div>
|
|
|
74 |
</div>
|
|
|
75 |
</td>
|
|
|
76 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
|
|
|
77 |
</tr>
|
|
|
78 |
<tr class="config-row">
|
|
|
79 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
80 |
<td class="sig">
|
|
|
81 |
<a id="Ext.data.Store-proxy"></a>
|
|
|
82 |
<b>proxy</b> : Ext.data.DataProxy <div class="mdesc">
|
|
|
83 |
The Proxy object which provides access to a data object. </div>
|
|
|
84 |
</td>
|
|
|
85 |
<td class="msource">Store</td>
|
|
|
86 |
</tr>
|
|
|
87 |
<tr class="config-row alt expandable">
|
|
|
88 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
89 |
<td class="sig">
|
|
|
90 |
<a id="Ext.data.Store-pruneModifiedRecords"></a>
|
|
|
91 |
<b>pruneModifiedRecords</b> : boolean <div class="mdesc">
|
|
|
92 |
<div class="short">True to clear all modified record information each time the store is loaded or when a record is removed. (defaults to...</div>
|
|
|
93 |
<div class="long">
|
|
|
94 |
True to clear all modified record information each time the store is loaded or when a record is removed. (defaults to false). </div>
|
|
|
95 |
</div>
|
|
|
96 |
</td>
|
|
|
97 |
<td class="msource">Store</td>
|
|
|
98 |
</tr>
|
|
|
99 |
<tr class="config-row expandable">
|
|
|
100 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
101 |
<td class="sig">
|
|
|
102 |
<a id="Ext.data.Store-reader"></a>
|
|
|
103 |
<b>reader</b> : Ext.data.DataReader <div class="mdesc">
|
|
|
104 |
<div class="short">The DataReader object which processes the data object and returns an Array of Ext.data.Record objects which are cache...</div>
|
|
|
105 |
<div class="long">
|
|
|
106 |
The DataReader object which processes the data object and returns an Array of Ext.data.Record objects which are cached keyed by their <em>id</em> property. </div>
|
|
|
107 |
</div>
|
|
|
108 |
</td>
|
|
|
109 |
<td class="msource">Store</td>
|
|
|
110 |
</tr>
|
|
|
111 |
<tr class="config-row alt expandable">
|
|
|
112 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
113 |
<td class="sig">
|
|
|
114 |
<a id="Ext.data.Store-remoteSort"></a>
|
|
|
115 |
<b>remoteSort</b> : boolean <div class="mdesc">
|
|
|
116 |
<div class="short">True if sorting is to be handled by requesting the Proxy to provide a refreshed version of the data object in sorted ...</div>
|
|
|
117 |
<div class="long">
|
|
|
118 |
True if sorting is to be handled by requesting the Proxy to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache in place (defaults to false). <p>If remote sorting is specified, then clicking on a column header causes the current page to be requested from the server with the addition of the following two parameters: <div class="mdetail-params"><ul> <li><b>sort</b> : String<p class="sub-desc">The name (as specified in the Record's Field definition) of the field to sort on.</p></li> <li><b>dir</b> : String<p class="sub-desc">The direction of the sort, "ASC" or "DESC" (case-sensitive).</p></li> </ul></div></p> </div>
|
|
|
119 |
</div>
|
|
|
120 |
</td>
|
|
|
121 |
<td class="msource">Store</td>
|
|
|
122 |
</tr>
|
|
|
123 |
<tr class="config-row">
|
|
|
124 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
125 |
<td class="sig">
|
|
|
126 |
<a id="Ext.data.Store-sortInfo"></a>
|
|
|
127 |
<b>sortInfo</b> : Object <div class="mdesc">
|
|
|
128 |
A config object in the format: {field: "fieldName", direction: "ASC|DESC"}. The direction property is case-sensitive. </div>
|
|
|
129 |
</td>
|
|
|
130 |
<td class="msource">Store</td>
|
|
|
131 |
</tr>
|
|
|
132 |
<tr class="config-row alt">
|
|
|
133 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
134 |
<td class="sig">
|
|
|
135 |
<a id="Ext.data.Store-storeId"></a>
|
|
|
136 |
<b>storeId</b> : String <div class="mdesc">
|
|
|
137 |
If passed, the id to use to register with the StoreMgr </div>
|
|
|
138 |
</td>
|
|
|
139 |
<td class="msource">Store</td>
|
|
|
140 |
</tr>
|
|
|
141 |
<tr class="config-row">
|
|
|
142 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
143 |
<td class="sig">
|
|
|
144 |
<a id="Ext.data.Store-url"></a>
|
|
|
145 |
<b>url</b> : String <div class="mdesc">
|
|
|
146 |
If passed, an HttpProxy is created for the passed URL </div>
|
|
|
147 |
</td>
|
|
|
148 |
<td class="msource">Store</td>
|
|
|
149 |
</tr>
|
|
|
150 |
</table>
|
|
|
151 |
<a id="Ext.data.Store-props"></a>
|
|
|
152 |
<h2>Public Properties</h2>
|
|
|
153 |
<table cellspacing="0" class="member-table">
|
|
|
154 |
<tr>
|
|
|
155 |
<th class="sig-header" colspan="2">Property</th>
|
|
|
156 |
<th class="msource-header">Defined By</th>
|
|
|
157 |
</tr>
|
|
|
158 |
<tr class="property-row">
|
|
|
159 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
160 |
<td class="sig">
|
|
|
161 |
<a id="Ext.data.Store-baseParams"></a>
|
|
|
162 |
<b>baseParams</b> : Object <div class="mdesc">
|
|
|
163 |
An object containing properties which are used as parameters on any HTTP request. </div>
|
|
|
164 |
</td>
|
|
|
165 |
<td class="msource">Store</td>
|
|
|
166 |
</tr>
|
|
|
167 |
<tr class="property-row alt expandable">
|
|
|
168 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
169 |
<td class="sig">
|
|
|
170 |
<a id="Ext.data.Store-lastOptions"></a>
|
|
|
171 |
<b>lastOptions</b> : Object <div class="mdesc">
|
|
|
172 |
<div class="short">Contains the last options object used as the parameter to the load method. See load
|
|
|
173 |
for the details of what this may ...</div>
|
|
|
174 |
<div class="long">
|
|
|
175 |
Contains the last options object used as the parameter to the load method. See <a ext:cls="Ext.data.Store" ext:member="load" href="output/Ext.data.Store.html#load">load</a>
|
|
|
176 |
for the details of what this may contain. This may be useful for accessing any params which
|
|
|
177 |
were used to load the current Record cache. </div>
|
|
|
178 |
</div>
|
|
|
179 |
</td>
|
|
|
180 |
<td class="msource">Store</td>
|
|
|
181 |
</tr>
|
|
|
182 |
</table>
|
|
|
183 |
<a id="Ext.data.Store-methods"></a>
|
|
|
184 |
<h2>Public Methods</h2>
|
|
|
185 |
<table cellspacing="0" class="member-table">
|
|
|
186 |
<tr>
|
|
|
187 |
<th class="sig-header" colspan="2">Method</th>
|
|
|
188 |
<th class="msource-header">Defined By</th>
|
|
|
189 |
</tr>
|
|
|
190 |
<tr class="method-row expandable">
|
|
|
191 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
192 |
<td class="sig">
|
|
|
193 |
<a id="Ext.data.Store-Store"></a>
|
|
|
194 |
<b>Store</b>( <code>Object config</code> ) <div class="mdesc">
|
|
|
195 |
<div class="short">Creates a new Store.</div>
|
|
|
196 |
<div class="long">
|
|
|
197 |
Creates a new Store. <div class="mdetail-params">
|
|
|
198 |
<strong>Parameters:</strong>
|
|
|
199 |
<ul><li><code>config</code> : Object<div class="sub-desc">A config object containing the objects needed for the Store to access data,
|
|
|
200 |
and read the data into Records.</div></li> </ul>
|
|
|
201 |
<strong>Returns:</strong>
|
|
|
202 |
<ul>
|
|
|
203 |
<li><code></code></li>
|
|
|
204 |
</ul>
|
|
|
205 |
</div>
|
|
|
206 |
</div>
|
|
|
207 |
</div>
|
|
|
208 |
</td>
|
|
|
209 |
<td class="msource">Store</td>
|
|
|
210 |
</tr>
|
|
|
211 |
<tr class="method-row alt expandable">
|
|
|
212 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
213 |
<td class="sig">
|
|
|
214 |
<a id="Ext.data.Store-add"></a>
|
|
|
215 |
<b>add</b>( <code>Ext.data.Record[] records</code> ) : void <div class="mdesc">
|
|
|
216 |
<div class="short">Add Records to the Store and fires the add event.</div>
|
|
|
217 |
<div class="long">
|
|
|
218 |
Add Records to the Store and fires the add event. <div class="mdetail-params">
|
|
|
219 |
<strong>Parameters:</strong>
|
|
|
220 |
<ul><li><code>records</code> : Ext.data.Record[]<div class="sub-desc">An Array of Ext.data.Record objects to add to the cache.</div></li> </ul>
|
|
|
221 |
<strong>Returns:</strong>
|
|
|
222 |
<ul>
|
|
|
223 |
<li><code>void</code></li>
|
|
|
224 |
</ul>
|
|
|
225 |
</div>
|
|
|
226 |
</div>
|
|
|
227 |
</div>
|
|
|
228 |
</td>
|
|
|
229 |
<td class="msource">Store</td>
|
|
|
230 |
</tr>
|
|
|
231 |
<tr class="method-row inherited expandable">
|
|
|
232 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
233 |
<td class="sig">
|
|
|
234 |
<a id="Ext.data.Store-addEvents"></a>
|
|
|
235 |
<b>addEvents</b>( <code>Object object</code> ) : void <div class="mdesc">
|
|
|
236 |
<div class="short">Used to define events on this Observable</div>
|
|
|
237 |
<div class="long">
|
|
|
238 |
Used to define events on this Observable <div class="mdetail-params">
|
|
|
239 |
<strong>Parameters:</strong>
|
|
|
240 |
<ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul>
|
|
|
241 |
<strong>Returns:</strong>
|
|
|
242 |
<ul>
|
|
|
243 |
<li><code>void</code></li>
|
|
|
244 |
</ul>
|
|
|
245 |
</div>
|
|
|
246 |
</div>
|
|
|
247 |
</div>
|
|
|
248 |
</td>
|
|
|
249 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
|
|
|
250 |
</tr>
|
|
|
251 |
<tr class="method-row inherited alt expandable">
|
|
|
252 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
253 |
<td class="sig">
|
|
|
254 |
<a id="Ext.data.Store-addListener"></a>
|
|
|
255 |
<b>addListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
|
|
|
256 |
<div class="short">Appends an event handler to this component</div>
|
|
|
257 |
<div class="long">
|
|
|
258 |
Appends an event handler to this component <div class="mdetail-params">
|
|
|
259 |
<strong>Parameters:</strong>
|
|
|
260 |
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
|
|
|
261 |
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
|
|
|
262 |
properties. This may contain any of the following properties:<ul>
|
|
|
263 |
<li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
|
|
|
264 |
<li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
|
|
|
265 |
<li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
|
|
|
266 |
<li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
|
|
|
267 |
by the specified number of milliseconds. If the event fires again within that time, the original
|
|
|
268 |
handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
|
|
|
269 |
</ul><br>
|
|
|
270 |
<p>
|
|
|
271 |
<b>Combining Options</b><br>
|
|
|
272 |
Using the options argument, it is possible to combine different types of listeners:<br>
|
|
|
273 |
<br>
|
|
|
274 |
A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
|
|
|
275 |
<pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
|
|
|
276 |
single: true,
|
|
|
277 |
delay: 100,
|
|
|
278 |
forumId: 4
|
|
|
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 handlers.
|
|
|
284 |
<p>
|
|
|
285 |
<pre><code>foo.on({
|
|
|
286 |
<em>'click'</em> : {
|
|
|
287 |
fn: <b>this</b>.onClick,
|
|
|
288 |
scope: <b>this</b>,
|
|
|
289 |
delay: 100
|
|
|
290 |
},
|
|
|
291 |
<em>'mouseover'</em> : {
|
|
|
292 |
fn: <b>this</b>.onMouseOver,
|
|
|
293 |
scope: <b>this</b>
|
|
|
294 |
},
|
|
|
295 |
<em>'mouseout'</em> : {
|
|
|
296 |
fn: <b>this</b>.onMouseOut,
|
|
|
297 |
scope: <b>this</b>
|
|
|
298 |
}
|
|
|
299 |
});</code></pre>
|
|
|
300 |
<p>
|
|
|
301 |
Or a shorthand syntax:<br>
|
|
|
302 |
<pre><code>foo.on({
|
|
|
303 |
<em>'click'</em> : <b>this</b>.onClick,
|
|
|
304 |
<em>'mouseover'</em> : <b>this</b>.onMouseOver,
|
|
|
305 |
<em>'mouseout'</em> : <b>this</b>.onMouseOut,
|
|
|
306 |
scope: <b>this</b>
|
|
|
307 |
});</code></pre></div></li> </ul>
|
|
|
308 |
<strong>Returns:</strong>
|
|
|
309 |
<ul>
|
|
|
310 |
<li><code>void</code></li>
|
|
|
311 |
</ul>
|
|
|
312 |
</div>
|
|
|
313 |
</div>
|
|
|
314 |
</div>
|
|
|
315 |
</td>
|
|
|
316 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
|
|
|
317 |
</tr>
|
|
|
318 |
<tr class="method-row expandable">
|
|
|
319 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
320 |
<td class="sig">
|
|
|
321 |
<a id="Ext.data.Store-addSorted"></a>
|
|
|
322 |
<b>addSorted</b>( <code>Ext.data.Record record</code> ) : void <div class="mdesc">
|
|
|
323 |
<div class="short">(Local sort only) Inserts the passed the record in the Store at the index where it
|
|
|
324 |
should go based on the current sor...</div>
|
|
|
325 |
<div class="long">
|
|
|
326 |
(Local sort only) Inserts the passed the record in the Store at the index where it
|
|
|
327 |
should go based on the current sort information <div class="mdetail-params">
|
|
|
328 |
<strong>Parameters:</strong>
|
|
|
329 |
<ul><li><code>record</code> : Ext.data.Record<div class="sub-desc"></div></li> </ul>
|
|
|
330 |
<strong>Returns:</strong>
|
|
|
331 |
<ul>
|
|
|
332 |
<li><code>void</code></li>
|
|
|
333 |
</ul>
|
|
|
334 |
</div>
|
|
|
335 |
</div>
|
|
|
336 |
</div>
|
|
|
337 |
</td>
|
|
|
338 |
<td class="msource">Store</td>
|
|
|
339 |
</tr>
|
|
|
340 |
<tr class="method-row alt expandable">
|
|
|
341 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
342 |
<td class="sig">
|
|
|
343 |
<a id="Ext.data.Store-clearFilter"></a>
|
|
|
344 |
<b>clearFilter</b>( <code>Boolean suppressEvent</code> ) : void <div class="mdesc">
|
|
|
345 |
<div class="short">Revert to a view of the Record cache with no filtering applied.</div>
|
|
|
346 |
<div class="long">
|
|
|
347 |
Revert to a view of the Record cache with no filtering applied. <div class="mdetail-params">
|
|
|
348 |
<strong>Parameters:</strong>
|
|
|
349 |
<ul><li><code>suppressEvent</code> : Boolean<div class="sub-desc">If true the filter is cleared silently without notifying listeners</div></li> </ul>
|
|
|
350 |
<strong>Returns:</strong>
|
|
|
351 |
<ul>
|
|
|
352 |
<li><code>void</code></li>
|
|
|
353 |
</ul>
|
|
|
354 |
</div>
|
|
|
355 |
</div>
|
|
|
356 |
</div>
|
|
|
357 |
</td>
|
|
|
358 |
<td class="msource">Store</td>
|
|
|
359 |
</tr>
|
|
|
360 |
<tr class="method-row expandable">
|
|
|
361 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
362 |
<td class="sig">
|
|
|
363 |
<a id="Ext.data.Store-collect"></a>
|
|
|
364 |
<b>collect</b>( <code>String dataIndex</code>, <span class="optional" title="Optional">[<code>Boolean allowNull</code>]</span>, <span class="optional" title="Optional">[<code>Boolean bypassFilter</code>]</span> ) : Array <div class="mdesc">
|
|
|
365 |
<div class="short">Collects unique values for a particular dataIndex from this store.</div>
|
|
|
366 |
<div class="long">
|
|
|
367 |
Collects unique values for a particular dataIndex from this store. <div class="mdetail-params">
|
|
|
368 |
<strong>Parameters:</strong>
|
|
|
369 |
<ul><li><code>dataIndex</code> : String<div class="sub-desc">The property to collect</div></li><li><code>allowNull</code> : Boolean<div class="sub-desc">(optional) Pass true to allow null, undefined or empty string values</div></li><li><code>bypassFilter</code> : Boolean<div class="sub-desc">(optional) Pass true to collect from all records, even ones which are filtered</div></li> </ul>
|
|
|
370 |
<strong>Returns:</strong>
|
|
|
371 |
<ul>
|
|
|
372 |
<li><code>Array</code><div class="sub-desc">An array of the unique values</div></li>
|
|
|
373 |
</ul>
|
|
|
374 |
</div>
|
|
|
375 |
</div>
|
|
|
376 |
</div>
|
|
|
377 |
</td>
|
|
|
378 |
<td class="msource">Store</td>
|
|
|
379 |
</tr>
|
|
|
380 |
<tr class="method-row alt expandable">
|
|
|
381 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
382 |
<td class="sig">
|
|
|
383 |
<a id="Ext.data.Store-commitChanges"></a>
|
|
|
384 |
<b>commitChanges</b>() : void <div class="mdesc">
|
|
|
385 |
<div class="short">Commit all Records with outstanding changes. To handle updates for changes, subscribe to the
|
|
|
386 |
Store's "update" event, ...</div>
|
|
|
387 |
<div class="long">
|
|
|
388 |
Commit all Records with outstanding changes. To handle updates for changes, subscribe to the
|
|
|
389 |
Store's "update" event, and perform updating when the third parameter is Ext.data.Record.COMMIT. <div class="mdetail-params">
|
|
|
390 |
<strong>Parameters:</strong>
|
|
|
391 |
<ul><li>None.</li> </ul>
|
|
|
392 |
<strong>Returns:</strong>
|
|
|
393 |
<ul>
|
|
|
394 |
<li><code>void</code></li>
|
|
|
395 |
</ul>
|
|
|
396 |
</div>
|
|
|
397 |
</div>
|
|
|
398 |
</div>
|
|
|
399 |
</td>
|
|
|
400 |
<td class="msource">Store</td>
|
|
|
401 |
</tr>
|
|
|
402 |
<tr class="method-row expandable">
|
|
|
403 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
404 |
<td class="sig">
|
|
|
405 |
<a id="Ext.data.Store-each"></a>
|
|
|
406 |
<b>each</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
|
|
|
407 |
<div class="short">Calls the specified function for each of the Records in the cache.</div>
|
|
|
408 |
<div class="long">
|
|
|
409 |
Calls the specified function for each of the Records in the cache. <div class="mdetail-params">
|
|
|
410 |
<strong>Parameters:</strong>
|
|
|
411 |
<ul><li><code>fn</code> : Function<div class="sub-desc">The function to call. The Record is passed as the first parameter.
|
|
|
412 |
Returning <tt>false</tt> aborts and exits the iteration.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to call the function (defaults to the Record).</div></li> </ul>
|
|
|
413 |
<strong>Returns:</strong>
|
|
|
414 |
<ul>
|
|
|
415 |
<li><code>void</code></li>
|
|
|
416 |
</ul>
|
|
|
417 |
</div>
|
|
|
418 |
</div>
|
|
|
419 |
</div>
|
|
|
420 |
</td>
|
|
|
421 |
<td class="msource">Store</td>
|
|
|
422 |
</tr>
|
|
|
423 |
<tr class="method-row alt expandable">
|
|
|
424 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
425 |
<td class="sig">
|
|
|
426 |
<a id="Ext.data.Store-filter"></a>
|
|
|
427 |
<b>filter</b>( <code>String field</code>, <code>String/RegExp value</code>, <span class="optional" title="Optional">[<code>Boolean anyMatch</code>]</span>, <span class="optional" title="Optional">[<code>Boolean caseSensitive</code>]</span> ) : void <div class="mdesc">
|
|
|
428 |
<div class="short">Filter the records by a specified property.</div>
|
|
|
429 |
<div class="long">
|
|
|
430 |
Filter the records by a specified property. <div class="mdetail-params">
|
|
|
431 |
<strong>Parameters:</strong>
|
|
|
432 |
<ul><li><code>field</code> : String<div class="sub-desc">A field on your records</div></li><li><code>value</code> : String/RegExp<div class="sub-desc">Either a string that the field
|
|
|
433 |
should start with or a RegExp to test against the field</div></li><li><code>anyMatch</code> : Boolean<div class="sub-desc">(optional) True to match any part not just the beginning</div></li><li><code>caseSensitive</code> : Boolean<div class="sub-desc">(optional) True for case sensitive comparison</div></li> </ul>
|
|
|
434 |
<strong>Returns:</strong>
|
|
|
435 |
<ul>
|
|
|
436 |
<li><code>void</code></li>
|
|
|
437 |
</ul>
|
|
|
438 |
</div>
|
|
|
439 |
</div>
|
|
|
440 |
</div>
|
|
|
441 |
</td>
|
|
|
442 |
<td class="msource">Store</td>
|
|
|
443 |
</tr>
|
|
|
444 |
<tr class="method-row expandable">
|
|
|
445 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
446 |
<td class="sig">
|
|
|
447 |
<a id="Ext.data.Store-filterBy"></a>
|
|
|
448 |
<b>filterBy</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
|
|
|
449 |
<div class="short">Filter by a function. The specified function will be called for each
|
|
|
450 |
Record in this Store. If the function returns tr...</div>
|
|
|
451 |
<div class="long">
|
|
|
452 |
Filter by a function. The specified function will be called for each
|
|
|
453 |
Record in this Store. If the function returns <tt>true</tt> the Record is included,
|
|
|
454 |
otherwise it is filtered out. <div class="mdetail-params">
|
|
|
455 |
<strong>Parameters:</strong>
|
|
|
456 |
<ul><li><code>fn</code> : Function<div class="sub-desc">The function to be called. It will be passed the following parameters:<ul>
|
|
|
457 |
<li><b>record</b> : Ext.data.Record<p class="sub-desc">The <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">record</a>
|
|
|
458 |
to test for filtering. Access field values using <a ext:cls="Ext.data.Record" ext:member="get" href="output/Ext.data.Record.html#get">Ext.data.Record.get</a>.</p></li>
|
|
|
459 |
<li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
|
|
|
460 |
</ul></div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the function (defaults to this)</div></li> </ul>
|
|
|
461 |
<strong>Returns:</strong>
|
|
|
462 |
<ul>
|
|
|
463 |
<li><code>void</code></li>
|
|
|
464 |
</ul>
|
|
|
465 |
</div>
|
|
|
466 |
</div>
|
|
|
467 |
</div>
|
|
|
468 |
</td>
|
|
|
469 |
<td class="msource">Store</td>
|
|
|
470 |
</tr>
|
|
|
471 |
<tr class="method-row alt expandable">
|
|
|
472 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
473 |
<td class="sig">
|
|
|
474 |
<a id="Ext.data.Store-find"></a>
|
|
|
475 |
<b>find</b>( <code>String property</code>, <code>String/RegExp value</code>, <span class="optional" title="Optional">[<code>Number startIndex</code>]</span>, <span class="optional" title="Optional">[<code>Boolean anyMatch</code>]</span>, <span class="optional" title="Optional">[<code>Boolean caseSensitive</code>]</span> ) : Number <div class="mdesc">
|
|
|
476 |
<div class="short">Finds the index of the first matching record in this store by a specific property/value.</div>
|
|
|
477 |
<div class="long">
|
|
|
478 |
Finds the index of the first matching record in this store by a specific property/value. <div class="mdetail-params">
|
|
|
479 |
<strong>Parameters:</strong>
|
|
|
480 |
<ul><li><code>property</code> : String<div class="sub-desc">A property on your objects</div></li><li><code>value</code> : String/RegExp<div class="sub-desc">Either string that the property values
|
|
|
481 |
should start with or a RegExp to test against the property.</div></li><li><code>startIndex</code> : Number<div class="sub-desc">(optional) The index to start searching at</div></li><li><code>anyMatch</code> : Boolean<div class="sub-desc">(optional) True to match any part of the string, not just the beginning</div></li><li><code>caseSensitive</code> : Boolean<div class="sub-desc">(optional) True for case sensitive comparison</div></li> </ul>
|
|
|
482 |
<strong>Returns:</strong>
|
|
|
483 |
<ul>
|
|
|
484 |
<li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>
|
|
|
485 |
</ul>
|
|
|
486 |
</div>
|
|
|
487 |
</div>
|
|
|
488 |
</div>
|
|
|
489 |
</td>
|
|
|
490 |
<td class="msource">Store</td>
|
|
|
491 |
</tr>
|
|
|
492 |
<tr class="method-row expandable">
|
|
|
493 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
494 |
<td class="sig">
|
|
|
495 |
<a id="Ext.data.Store-findBy"></a>
|
|
|
496 |
<b>findBy</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Number startIndex</code>]</span> ) : Number <div class="mdesc">
|
|
|
497 |
<div class="short">Find the index of the first matching Record in this Store by a function.
|
|
|
498 |
If the function returns true it is considere...</div>
|
|
|
499 |
<div class="long">
|
|
|
500 |
Find the index of the first matching Record in this Store by a function.
|
|
|
501 |
If the function returns <tt>true</tt> it is considered a match. <div class="mdetail-params">
|
|
|
502 |
<strong>Parameters:</strong>
|
|
|
503 |
<ul><li><code>fn</code> : Function<div class="sub-desc">The function to be called. It will be passed the following parameters:<ul>
|
|
|
504 |
<li><b>record</b> : Ext.data.Record<p class="sub-desc">The <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">record</a>
|
|
|
505 |
to test for filtering. Access field values using <a ext:cls="Ext.data.Record" ext:member="get" href="output/Ext.data.Record.html#get">Ext.data.Record.get</a>.</p></li>
|
|
|
506 |
<li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
|
|
|
507 |
</ul></div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the function (defaults to this)</div></li><li><code>startIndex</code> : Number<div class="sub-desc">(optional) The index to start searching at</div></li> </ul>
|
|
|
508 |
<strong>Returns:</strong>
|
|
|
509 |
<ul>
|
|
|
510 |
<li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>
|
|
|
511 |
</ul>
|
|
|
512 |
</div>
|
|
|
513 |
</div>
|
|
|
514 |
</div>
|
|
|
515 |
</td>
|
|
|
516 |
<td class="msource">Store</td>
|
|
|
517 |
</tr>
|
|
|
518 |
<tr class="method-row inherited alt expandable">
|
|
|
519 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
520 |
<td class="sig">
|
|
|
521 |
<a id="Ext.data.Store-fireEvent"></a>
|
|
|
522 |
<b>fireEvent</b>( <code>String eventName</code>, <code>Object... args</code> ) : Boolean <div class="mdesc">
|
|
|
523 |
<div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
|
|
|
524 |
<div class="long">
|
|
|
525 |
Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params">
|
|
|
526 |
<strong>Parameters:</strong>
|
|
|
527 |
<ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li> </ul>
|
|
|
528 |
<strong>Returns:</strong>
|
|
|
529 |
<ul>
|
|
|
530 |
<li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
|
|
|
531 |
</ul>
|
|
|
532 |
</div>
|
|
|
533 |
</div>
|
|
|
534 |
</div>
|
|
|
535 |
</td>
|
|
|
536 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
|
|
|
537 |
</tr>
|
|
|
538 |
<tr class="method-row expandable">
|
|
|
539 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
540 |
<td class="sig">
|
|
|
541 |
<a id="Ext.data.Store-getAt"></a>
|
|
|
542 |
<b>getAt</b>( <code>Number index</code> ) : Ext.data.Record <div class="mdesc">
|
|
|
543 |
<div class="short">Get the Record at the specified index.</div>
|
|
|
544 |
<div class="long">
|
|
|
545 |
Get the Record at the specified index. <div class="mdetail-params">
|
|
|
546 |
<strong>Parameters:</strong>
|
|
|
547 |
<ul><li><code>index</code> : Number<div class="sub-desc">The index of the Record to find.</div></li> </ul>
|
|
|
548 |
<strong>Returns:</strong>
|
|
|
549 |
<ul>
|
|
|
550 |
<li><code>Ext.data.Record</code><div class="sub-desc">The Record at the passed index. Returns undefined if not found.</div></li>
|
|
|
551 |
</ul>
|
|
|
552 |
</div>
|
|
|
553 |
</div>
|
|
|
554 |
</div>
|
|
|
555 |
</td>
|
|
|
556 |
<td class="msource">Store</td>
|
|
|
557 |
</tr>
|
|
|
558 |
<tr class="method-row alt expandable">
|
|
|
559 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
560 |
<td class="sig">
|
|
|
561 |
<a id="Ext.data.Store-getById"></a>
|
|
|
562 |
<b>getById</b>( <code>String id</code> ) : Ext.data.Record <div class="mdesc">
|
|
|
563 |
<div class="short">Get the Record with the specified id.</div>
|
|
|
564 |
<div class="long">
|
|
|
565 |
Get the Record with the specified id. <div class="mdetail-params">
|
|
|
566 |
<strong>Parameters:</strong>
|
|
|
567 |
<ul><li><code>id</code> : String<div class="sub-desc">The id of the Record to find.</div></li> </ul>
|
|
|
568 |
<strong>Returns:</strong>
|
|
|
569 |
<ul>
|
|
|
570 |
<li><code>Ext.data.Record</code><div class="sub-desc">The Record with the passed id. Returns undefined if not found.</div></li>
|
|
|
571 |
</ul>
|
|
|
572 |
</div>
|
|
|
573 |
</div>
|
|
|
574 |
</div>
|
|
|
575 |
</td>
|
|
|
576 |
<td class="msource">Store</td>
|
|
|
577 |
</tr>
|
|
|
578 |
<tr class="method-row expandable">
|
|
|
579 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
580 |
<td class="sig">
|
|
|
581 |
<a id="Ext.data.Store-getCount"></a>
|
|
|
582 |
<b>getCount</b>() : Number <div class="mdesc">
|
|
|
583 |
<div class="short">Gets the number of cached records.
|
|
|
584 |
If using paging, this may not be the total size of the dataset. If the data object...</div>
|
|
|
585 |
<div class="long">
|
|
|
586 |
Gets the number of cached records.
|
|
|
587 |
<p>If using paging, this may not be the total size of the dataset. If the data object
|
|
|
588 |
used by the Reader contains the dataset size, then the <a ext:cls="Ext.data.Store" ext:member="getTotalCount" href="output/Ext.data.Store.html#getTotalCount">getTotalCount</a> function returns
|
|
|
589 |
the dataset size.</p> <div class="mdetail-params">
|
|
|
590 |
<strong>Parameters:</strong>
|
|
|
591 |
<ul><li>None.</li> </ul>
|
|
|
592 |
<strong>Returns:</strong>
|
|
|
593 |
<ul>
|
|
|
594 |
<li><code>Number</code><div class="sub-desc">The number of Records in the Store's cache.</div></li>
|
|
|
595 |
</ul>
|
|
|
596 |
</div>
|
|
|
597 |
</div>
|
|
|
598 |
</div>
|
|
|
599 |
</td>
|
|
|
600 |
<td class="msource">Store</td>
|
|
|
601 |
</tr>
|
|
|
602 |
<tr class="method-row alt expandable">
|
|
|
603 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
604 |
<td class="sig">
|
|
|
605 |
<a id="Ext.data.Store-getModifiedRecords"></a>
|
|
|
606 |
<b>getModifiedRecords</b>() : Ext.data.Record[] <div class="mdesc">
|
|
|
607 |
<div class="short">Gets all records modified since the last commit. Modified records are persisted across load operations
|
|
|
608 |
(e.g., during...</div>
|
|
|
609 |
<div class="long">
|
|
|
610 |
Gets all records modified since the last commit. Modified records are persisted across load operations
|
|
|
611 |
(e.g., during paging). <div class="mdetail-params">
|
|
|
612 |
<strong>Parameters:</strong>
|
|
|
613 |
<ul><li>None.</li> </ul>
|
|
|
614 |
<strong>Returns:</strong>
|
|
|
615 |
<ul>
|
|
|
616 |
<li><code>Ext.data.Record[]</code><div class="sub-desc">An array of Records containing outstanding modifications.</div></li>
|
|
|
617 |
</ul>
|
|
|
618 |
</div>
|
|
|
619 |
</div>
|
|
|
620 |
</div>
|
|
|
621 |
</td>
|
|
|
622 |
<td class="msource">Store</td>
|
|
|
623 |
</tr>
|
|
|
624 |
<tr class="method-row expandable">
|
|
|
625 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
626 |
<td class="sig">
|
|
|
627 |
<a id="Ext.data.Store-getRange"></a>
|
|
|
628 |
<b>getRange</b>( <span class="optional" title="Optional">[<code>Number startIndex</code>]</span>, <span class="optional" title="Optional">[<code>Number endIndex</code>]</span> ) : Ext.data.Record[] <div class="mdesc">
|
|
|
629 |
<div class="short">Returns a range of Records between specified indices.</div>
|
|
|
630 |
<div class="long">
|
|
|
631 |
Returns a range of Records between specified indices. <div class="mdetail-params">
|
|
|
632 |
<strong>Parameters:</strong>
|
|
|
633 |
<ul><li><code>startIndex</code> : Number<div class="sub-desc">(optional) The starting index (defaults to 0)</div></li><li><code>endIndex</code> : Number<div class="sub-desc">(optional) The ending index (defaults to the last Record in the Store)</div></li> </ul>
|
|
|
634 |
<strong>Returns:</strong>
|
|
|
635 |
<ul>
|
|
|
636 |
<li><code>Ext.data.Record[]</code><div class="sub-desc">An array of Records</div></li>
|
|
|
637 |
</ul>
|
|
|
638 |
</div>
|
|
|
639 |
</div>
|
|
|
640 |
</div>
|
|
|
641 |
</td>
|
|
|
642 |
<td class="msource">Store</td>
|
|
|
643 |
</tr>
|
|
|
644 |
<tr class="method-row alt expandable">
|
|
|
645 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
646 |
<td class="sig">
|
|
|
647 |
<a id="Ext.data.Store-getSortState"></a>
|
|
|
648 |
<b>getSortState</b>() : Object <div class="mdesc">
|
|
|
649 |
<div class="short">Returns an object describing the current sort state of this Store.</div>
|
|
|
650 |
<div class="long">
|
|
|
651 |
Returns an object describing the current sort state of this Store. <div class="mdetail-params">
|
|
|
652 |
<strong>Parameters:</strong>
|
|
|
653 |
<ul><li>None.</li> </ul>
|
|
|
654 |
<strong>Returns:</strong>
|
|
|
655 |
<ul>
|
|
|
656 |
<li><code>Object</code><div class="sub-desc">The sort state of the Store. An object with two properties:<ul> <li><b>field : String<p class="sub-desc">The name of the field by which the Records are sorted.</p></li> <li><b>direction : String<p class="sub-desc">The sort order, "ASC" or "DESC" (case-sensitive).</p></li> </ul></div></li>
|
|
|
657 |
</ul>
|
|
|
658 |
</div>
|
|
|
659 |
</div>
|
|
|
660 |
</div>
|
|
|
661 |
</td>
|
|
|
662 |
<td class="msource">Store</td>
|
|
|
663 |
</tr>
|
|
|
664 |
<tr class="method-row expandable">
|
|
|
665 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
666 |
<td class="sig">
|
|
|
667 |
<a id="Ext.data.Store-getTotalCount"></a>
|
|
|
668 |
<b>getTotalCount</b>() : Number <div class="mdesc">
|
|
|
669 |
<div class="short">Gets the total number of records in the dataset as returned by the server.
|
|
|
670 |
If using paging, for this to be accurate, ...</div>
|
|
|
671 |
<div class="long">
|
|
|
672 |
Gets the total number of records in the dataset as returned by the server.
|
|
|
673 |
<p>If using paging, for this to be accurate, the data object used by the Reader must contain
|
|
|
674 |
the dataset size. For remote data sources, this is provided by a query on the server.</p> <div class="mdetail-params">
|
|
|
675 |
<strong>Parameters:</strong>
|
|
|
676 |
<ul><li>None.</li> </ul>
|
|
|
677 |
<strong>Returns:</strong>
|
|
|
678 |
<ul>
|
|
|
679 |
<li><code>Number</code><div class="sub-desc">The number of Records as specified in the data object passed to the Reader by the Proxy <p><b>This value is not updated when changing the contents of the Store locally.</b></p></div></li>
|
|
|
680 |
</ul>
|
|
|
681 |
</div>
|
|
|
682 |
</div>
|
|
|
683 |
</div>
|
|
|
684 |
</td>
|
|
|
685 |
<td class="msource">Store</td>
|
|
|
686 |
</tr>
|
|
|
687 |
<tr class="method-row inherited alt expandable">
|
|
|
688 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
689 |
<td class="sig">
|
|
|
690 |
<a id="Ext.data.Store-hasListener"></a>
|
|
|
691 |
<b>hasListener</b>( <code>String eventName</code> ) : Boolean <div class="mdesc">
|
|
|
692 |
<div class="short">Checks to see if this object has any listeners for a specified event</div>
|
|
|
693 |
<div class="long">
|
|
|
694 |
Checks to see if this object has any listeners for a specified event <div class="mdetail-params">
|
|
|
695 |
<strong>Parameters:</strong>
|
|
|
696 |
<ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
|
|
|
697 |
<strong>Returns:</strong>
|
|
|
698 |
<ul>
|
|
|
699 |
<li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
|
|
|
700 |
</ul>
|
|
|
701 |
</div>
|
|
|
702 |
</div>
|
|
|
703 |
</div>
|
|
|
704 |
</td>
|
|
|
705 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
|
|
|
706 |
</tr>
|
|
|
707 |
<tr class="method-row expandable">
|
|
|
708 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
709 |
<td class="sig">
|
|
|
710 |
<a id="Ext.data.Store-indexOf"></a>
|
|
|
711 |
<b>indexOf</b>( <code>Ext.data.Record record</code> ) : Number <div class="mdesc">
|
|
|
712 |
<div class="short">Get the index within the cache of the passed Record.</div>
|
|
|
713 |
<div class="long">
|
|
|
714 |
Get the index within the cache of the passed Record. <div class="mdetail-params">
|
|
|
715 |
<strong>Parameters:</strong>
|
|
|
716 |
<ul><li><code>record</code> : Ext.data.Record<div class="sub-desc">The Ext.data.Record object to to find.</div></li> </ul>
|
|
|
717 |
<strong>Returns:</strong>
|
|
|
718 |
<ul>
|
|
|
719 |
<li><code>Number</code><div class="sub-desc">The index of the passed Record. Returns -1 if not found.</div></li>
|
|
|
720 |
</ul>
|
|
|
721 |
</div>
|
|
|
722 |
</div>
|
|
|
723 |
</div>
|
|
|
724 |
</td>
|
|
|
725 |
<td class="msource">Store</td>
|
|
|
726 |
</tr>
|
|
|
727 |
<tr class="method-row alt expandable">
|
|
|
728 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
729 |
<td class="sig">
|
|
|
730 |
<a id="Ext.data.Store-indexOfId"></a>
|
|
|
731 |
<b>indexOfId</b>( <code>String id</code> ) : Number <div class="mdesc">
|
|
|
732 |
<div class="short">Get the index within the cache of the Record with the passed id.</div>
|
|
|
733 |
<div class="long">
|
|
|
734 |
Get the index within the cache of the Record with the passed id. <div class="mdetail-params">
|
|
|
735 |
<strong>Parameters:</strong>
|
|
|
736 |
<ul><li><code>id</code> : String<div class="sub-desc">The id of the Record to find.</div></li> </ul>
|
|
|
737 |
<strong>Returns:</strong>
|
|
|
738 |
<ul>
|
|
|
739 |
<li><code>Number</code><div class="sub-desc">The index of the Record. Returns -1 if not found.</div></li>
|
|
|
740 |
</ul>
|
|
|
741 |
</div>
|
|
|
742 |
</div>
|
|
|
743 |
</div>
|
|
|
744 |
</td>
|
|
|
745 |
<td class="msource">Store</td>
|
|
|
746 |
</tr>
|
|
|
747 |
<tr class="method-row expandable">
|
|
|
748 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
749 |
<td class="sig">
|
|
|
750 |
<a id="Ext.data.Store-insert"></a>
|
|
|
751 |
<b>insert</b>( <code>Number index</code>, <code>Ext.data.Record[] records</code> ) : void <div class="mdesc">
|
|
|
752 |
<div class="short">Inserts Records to the Store at the given index and fires the add event.</div>
|
|
|
753 |
<div class="long">
|
|
|
754 |
Inserts Records to the Store at the given index and fires the add event. <div class="mdetail-params">
|
|
|
755 |
<strong>Parameters:</strong>
|
|
|
756 |
<ul><li><code>index</code> : Number<div class="sub-desc">The start index at which to insert the passed Records.</div></li><li><code>records</code> : Ext.data.Record[]<div class="sub-desc">An Array of Ext.data.Record objects to add to the cache.</div></li> </ul>
|
|
|
757 |
<strong>Returns:</strong>
|
|
|
758 |
<ul>
|
|
|
759 |
<li><code>void</code></li>
|
|
|
760 |
</ul>
|
|
|
761 |
</div>
|
|
|
762 |
</div>
|
|
|
763 |
</div>
|
|
|
764 |
</td>
|
|
|
765 |
<td class="msource">Store</td>
|
|
|
766 |
</tr>
|
|
|
767 |
<tr class="method-row alt expandable">
|
|
|
768 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
769 |
<td class="sig">
|
|
|
770 |
<a id="Ext.data.Store-isFiltered"></a>
|
|
|
771 |
<b>isFiltered</b>() : Boolean <div class="mdesc">
|
|
|
772 |
<div class="short">Returns true if this store is currently filtered</div>
|
|
|
773 |
<div class="long">
|
|
|
774 |
Returns true if this store is currently filtered <div class="mdetail-params">
|
|
|
775 |
<strong>Parameters:</strong>
|
|
|
776 |
<ul><li>None.</li> </ul>
|
|
|
777 |
<strong>Returns:</strong>
|
|
|
778 |
<ul>
|
|
|
779 |
<li><code>Boolean</code></li>
|
|
|
780 |
</ul>
|
|
|
781 |
</div>
|
|
|
782 |
</div>
|
|
|
783 |
</div>
|
|
|
784 |
</td>
|
|
|
785 |
<td class="msource">Store</td>
|
|
|
786 |
</tr>
|
|
|
787 |
<tr class="method-row expandable">
|
|
|
788 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
789 |
<td class="sig">
|
|
|
790 |
<a id="Ext.data.Store-load"></a>
|
|
|
791 |
<b>load</b>( <code>Object options</code> ) : Boolean <div class="mdesc">
|
|
|
792 |
<div class="short">Loads the Record cache from the configured Proxy using the configured Reader.
|
|
|
793 |
If using remote paging, then the first ...</div>
|
|
|
794 |
<div class="long">
|
|
|
795 |
Loads the Record cache from the configured Proxy using the configured Reader.
|
|
|
796 |
<p>If using remote paging, then the first load call must specify the <tt>start</tt>
|
|
|
797 |
and <tt>limit</tt> properties in the options.params property to establish the initial
|
|
|
798 |
position within the dataset, and the number of Records to cache on each read from the Proxy.</p>
|
|
|
799 |
<p><b>It is important to note that for remote data sources, loading is asynchronous,
|
|
|
800 |
and this call will return before the new data has been loaded. Perform any post-processing
|
|
|
801 |
in a callback function, or in a "load" event handler.</b></p> <div class="mdetail-params">
|
|
|
802 |
<strong>Parameters:</strong>
|
|
|
803 |
<ul><li><code>options</code> : Object<div class="sub-desc">An object containing properties which control loading options:<ul>
|
|
|
804 |
<li><b>params</b> :Object<p class="sub-desc">An object containing properties to pass as HTTP parameters to a remote data source.</p></li>
|
|
|
805 |
<li><b>callback</b> : Function<p class="sub-desc">A function to be called after the Records have been loaded. The callback is
|
|
|
806 |
passed the following arguments:<ul>
|
|
|
807 |
<li>r : Ext.data.Record[]</li>
|
|
|
808 |
<li>options: Options object from the load call</li>
|
|
|
809 |
<li>success: Boolean success indicator</li></ul></p></li>
|
|
|
810 |
<li><b>scope</b> : Object<p class="sub-desc">Scope with which to call the callback (defaults to the Store object)</p></li>
|
|
|
811 |
<li><b>add</b> : Boolean<p class="sub-desc">Indicator to append loaded records rather than replace the current cache.</p></li>
|
|
|
812 |
</ul></div></li> </ul>
|
|
|
813 |
<strong>Returns:</strong>
|
|
|
814 |
<ul>
|
|
|
815 |
<li><code>Boolean</code><div class="sub-desc">Whether the load fired (if beforeload failed).</div></li>
|
|
|
816 |
</ul>
|
|
|
817 |
</div>
|
|
|
818 |
</div>
|
|
|
819 |
</div>
|
|
|
820 |
</td>
|
|
|
821 |
<td class="msource">Store</td>
|
|
|
822 |
</tr>
|
|
|
823 |
<tr class="method-row alt expandable">
|
|
|
824 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
825 |
<td class="sig">
|
|
|
826 |
<a id="Ext.data.Store-loadData"></a>
|
|
|
827 |
<b>loadData</b>( <code>Object data</code>, <span class="optional" title="Optional">[<code>Boolean append</code>]</span> ) : void <div class="mdesc">
|
|
|
828 |
<div class="short">Loads data from a passed data block. A Reader which understands the format of the data
|
|
|
829 |
must have been configured in t...</div>
|
|
|
830 |
<div class="long">
|
|
|
831 |
Loads data from a passed data block. A Reader which understands the format of the data
|
|
|
832 |
must have been configured in the constructor. <div class="mdetail-params">
|
|
|
833 |
<strong>Parameters:</strong>
|
|
|
834 |
<ul><li><code>data</code> : Object<div class="sub-desc">The data block from which to read the Records. The format of the data expected
|
|
|
835 |
is dependent on the type of Reader that is configured and should correspond to that Reader's readRecords parameter.</div></li><li><code>append</code> : Boolean<div class="sub-desc">(Optional) True to append the new Records rather than replace the existing cache.</div></li> </ul>
|
|
|
836 |
<strong>Returns:</strong>
|
|
|
837 |
<ul>
|
|
|
838 |
<li><code>void</code></li>
|
|
|
839 |
</ul>
|
|
|
840 |
</div>
|
|
|
841 |
</div>
|
|
|
842 |
</div>
|
|
|
843 |
</td>
|
|
|
844 |
<td class="msource">Store</td>
|
|
|
845 |
</tr>
|
|
|
846 |
<tr class="method-row inherited expandable">
|
|
|
847 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
848 |
<td class="sig">
|
|
|
849 |
<a id="Ext.data.Store-on"></a>
|
|
|
850 |
<b>on</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
|
|
|
851 |
<div class="short">Appends an event handler to this element (shorthand for addListener)</div>
|
|
|
852 |
<div class="long">
|
|
|
853 |
Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params">
|
|
|
854 |
<strong>Parameters:</strong>
|
|
|
855 |
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
|
|
|
856 |
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
|
|
|
857 |
<strong>Returns:</strong>
|
|
|
858 |
<ul>
|
|
|
859 |
<li><code>void</code></li>
|
|
|
860 |
</ul>
|
|
|
861 |
</div>
|
|
|
862 |
</div>
|
|
|
863 |
</div>
|
|
|
864 |
</td>
|
|
|
865 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
|
|
|
866 |
</tr>
|
|
|
867 |
<tr class="method-row inherited alt expandable">
|
|
|
868 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
869 |
<td class="sig">
|
|
|
870 |
<a id="Ext.data.Store-purgeListeners"></a>
|
|
|
871 |
<b>purgeListeners</b>() : void <div class="mdesc">
|
|
|
872 |
<div class="short">Removes all listeners for this object</div>
|
|
|
873 |
<div class="long">
|
|
|
874 |
Removes all listeners for this object <div class="mdetail-params">
|
|
|
875 |
<strong>Parameters:</strong>
|
|
|
876 |
<ul><li>None.</li> </ul>
|
|
|
877 |
<strong>Returns:</strong>
|
|
|
878 |
<ul>
|
|
|
879 |
<li><code>void</code></li>
|
|
|
880 |
</ul>
|
|
|
881 |
</div>
|
|
|
882 |
</div>
|
|
|
883 |
</div>
|
|
|
884 |
</td>
|
|
|
885 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
|
|
|
886 |
</tr>
|
|
|
887 |
<tr class="method-row expandable">
|
|
|
888 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
889 |
<td class="sig">
|
|
|
890 |
<a id="Ext.data.Store-query"></a>
|
|
|
891 |
<b>query</b>( <code>String field</code>, <code>String/RegExp value</code>, <span class="optional" title="Optional">[<code>Boolean anyMatch</code>]</span>, <span class="optional" title="Optional">[<code>Boolean caseSensitive</code>]</span> ) : MixedCollection <div class="mdesc">
|
|
|
892 |
<div class="short">Query the records by a specified property.</div>
|
|
|
893 |
<div class="long">
|
|
|
894 |
Query the records by a specified property. <div class="mdetail-params">
|
|
|
895 |
<strong>Parameters:</strong>
|
|
|
896 |
<ul><li><code>field</code> : String<div class="sub-desc">A field on your records</div></li><li><code>value</code> : String/RegExp<div class="sub-desc">Either a string that the field
|
|
|
897 |
should start with or a RegExp to test against the field</div></li><li><code>anyMatch</code> : Boolean<div class="sub-desc">(optional) True to match any part not just the beginning</div></li><li><code>caseSensitive</code> : Boolean<div class="sub-desc">(optional) True for case sensitive comparison</div></li> </ul>
|
|
|
898 |
<strong>Returns:</strong>
|
|
|
899 |
<ul>
|
|
|
900 |
<li><code>MixedCollection</code><div class="sub-desc">Returns an Ext.util.MixedCollection of the matched records</div></li>
|
|
|
901 |
</ul>
|
|
|
902 |
</div>
|
|
|
903 |
</div>
|
|
|
904 |
</div>
|
|
|
905 |
</td>
|
|
|
906 |
<td class="msource">Store</td>
|
|
|
907 |
</tr>
|
|
|
908 |
<tr class="method-row alt expandable">
|
|
|
909 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
910 |
<td class="sig">
|
|
|
911 |
<a id="Ext.data.Store-queryBy"></a>
|
|
|
912 |
<b>queryBy</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : MixedCollection <div class="mdesc">
|
|
|
913 |
<div class="short">Query the cached records in this Store using a filtering function. The specified function
|
|
|
914 |
will be called with each re...</div>
|
|
|
915 |
<div class="long">
|
|
|
916 |
Query the cached records in this Store using a filtering function. The specified function
|
|
|
917 |
will be called with each record in this Store. If the function returns <tt>true</tt> the record is
|
|
|
918 |
included in the results. <div class="mdetail-params">
|
|
|
919 |
<strong>Parameters:</strong>
|
|
|
920 |
<ul><li><code>fn</code> : Function<div class="sub-desc">The function to be called. It will be passed the following parameters:<ul>
|
|
|
921 |
<li><b>record</b> : Ext.data.Record<p class="sub-desc">The <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">record</a>
|
|
|
922 |
to test for filtering. Access field values using <a ext:cls="Ext.data.Record" ext:member="get" href="output/Ext.data.Record.html#get">Ext.data.Record.get</a>.</p></li>
|
|
|
923 |
<li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li>
|
|
|
924 |
</ul></div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the function (defaults to this)</div></li> </ul>
|
|
|
925 |
<strong>Returns:</strong>
|
|
|
926 |
<ul>
|
|
|
927 |
<li><code>MixedCollection</code><div class="sub-desc">Returns an Ext.util.MixedCollection of the matched records</div></li>
|
|
|
928 |
</ul>
|
|
|
929 |
</div>
|
|
|
930 |
</div>
|
|
|
931 |
</div>
|
|
|
932 |
</td>
|
|
|
933 |
<td class="msource">Store</td>
|
|
|
934 |
</tr>
|
|
|
935 |
<tr class="method-row expandable">
|
|
|
936 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
937 |
<td class="sig">
|
|
|
938 |
<a id="Ext.data.Store-rejectChanges"></a>
|
|
|
939 |
<b>rejectChanges</b>() : void <div class="mdesc">
|
|
|
940 |
<div class="short">Cancel outstanding changes on all changed records.</div>
|
|
|
941 |
<div class="long">
|
|
|
942 |
Cancel outstanding changes on all changed records. <div class="mdetail-params">
|
|
|
943 |
<strong>Parameters:</strong>
|
|
|
944 |
<ul><li>None.</li> </ul>
|
|
|
945 |
<strong>Returns:</strong>
|
|
|
946 |
<ul>
|
|
|
947 |
<li><code>void</code></li>
|
|
|
948 |
</ul>
|
|
|
949 |
</div>
|
|
|
950 |
</div>
|
|
|
951 |
</div>
|
|
|
952 |
</td>
|
|
|
953 |
<td class="msource">Store</td>
|
|
|
954 |
</tr>
|
|
|
955 |
<tr class="method-row alt expandable">
|
|
|
956 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
957 |
<td class="sig">
|
|
|
958 |
<a id="Ext.data.Store-reload"></a>
|
|
|
959 |
<b>reload</b>( <span class="optional" title="Optional">[<code>Object options</code>]</span> ) : void <div class="mdesc">
|
|
|
960 |
<div class="short">Reloads the Record cache from the configured Proxy using the configured Reader and
|
|
|
961 |
the options from the last load ope...</div>
|
|
|
962 |
<div class="long">
|
|
|
963 |
Reloads the Record cache from the configured Proxy using the configured Reader and
|
|
|
964 |
the options from the last load operation performed. <div class="mdetail-params">
|
|
|
965 |
<strong>Parameters:</strong>
|
|
|
966 |
<ul><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing properties which may override the options
|
|
|
967 |
used in the last load operation. See <a ext:cls="Ext.data.Store" ext:member="load" href="output/Ext.data.Store.html#load">load</a> for details (defaults to null, in which case
|
|
|
968 |
the most recently used options are reused).</div></li> </ul>
|
|
|
969 |
<strong>Returns:</strong>
|
|
|
970 |
<ul>
|
|
|
971 |
<li><code>void</code></li>
|
|
|
972 |
</ul>
|
|
|
973 |
</div>
|
|
|
974 |
</div>
|
|
|
975 |
</div>
|
|
|
976 |
</td>
|
|
|
977 |
<td class="msource">Store</td>
|
|
|
978 |
</tr>
|
|
|
979 |
<tr class="method-row expandable">
|
|
|
980 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
981 |
<td class="sig">
|
|
|
982 |
<a id="Ext.data.Store-remove"></a>
|
|
|
983 |
<b>remove</b>( <code>Ext.data.Record record</code> ) : void <div class="mdesc">
|
|
|
984 |
<div class="short">Remove a Record from the Store and fires the remove event.</div>
|
|
|
985 |
<div class="long">
|
|
|
986 |
Remove a Record from the Store and fires the remove event. <div class="mdetail-params">
|
|
|
987 |
<strong>Parameters:</strong>
|
|
|
988 |
<ul><li><code>record</code> : Ext.data.Record<div class="sub-desc">Th Ext.data.Record object to remove from the cache.</div></li> </ul>
|
|
|
989 |
<strong>Returns:</strong>
|
|
|
990 |
<ul>
|
|
|
991 |
<li><code>void</code></li>
|
|
|
992 |
</ul>
|
|
|
993 |
</div>
|
|
|
994 |
</div>
|
|
|
995 |
</div>
|
|
|
996 |
</td>
|
|
|
997 |
<td class="msource">Store</td>
|
|
|
998 |
</tr>
|
|
|
999 |
<tr class="method-row alt expandable">
|
|
|
1000 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1001 |
<td class="sig">
|
|
|
1002 |
<a id="Ext.data.Store-removeAll"></a>
|
|
|
1003 |
<b>removeAll</b>() : void <div class="mdesc">
|
|
|
1004 |
<div class="short">Remove all Records from the Store and fires the clear event.</div>
|
|
|
1005 |
<div class="long">
|
|
|
1006 |
Remove all Records from the Store and fires the clear event. <div class="mdetail-params">
|
|
|
1007 |
<strong>Parameters:</strong>
|
|
|
1008 |
<ul><li>None.</li> </ul>
|
|
|
1009 |
<strong>Returns:</strong>
|
|
|
1010 |
<ul>
|
|
|
1011 |
<li><code>void</code></li>
|
|
|
1012 |
</ul>
|
|
|
1013 |
</div>
|
|
|
1014 |
</div>
|
|
|
1015 |
</div>
|
|
|
1016 |
</td>
|
|
|
1017 |
<td class="msource">Store</td>
|
|
|
1018 |
</tr>
|
|
|
1019 |
<tr class="method-row inherited expandable">
|
|
|
1020 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1021 |
<td class="sig">
|
|
|
1022 |
<a id="Ext.data.Store-removeListener"></a>
|
|
|
1023 |
<b>removeListener</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
|
|
|
1024 |
<div class="short">Removes a listener</div>
|
|
|
1025 |
<div class="long">
|
|
|
1026 |
Removes a listener <div class="mdetail-params">
|
|
|
1027 |
<strong>Parameters:</strong>
|
|
|
1028 |
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
|
|
|
1029 |
<strong>Returns:</strong>
|
|
|
1030 |
<ul>
|
|
|
1031 |
<li><code>void</code></li>
|
|
|
1032 |
</ul>
|
|
|
1033 |
</div>
|
|
|
1034 |
</div>
|
|
|
1035 |
</div>
|
|
|
1036 |
</td>
|
|
|
1037 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
|
|
|
1038 |
</tr>
|
|
|
1039 |
<tr class="method-row inherited alt expandable">
|
|
|
1040 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1041 |
<td class="sig">
|
|
|
1042 |
<a id="Ext.data.Store-resumeEvents"></a>
|
|
|
1043 |
<b>resumeEvents</b>() : void <div class="mdesc">
|
|
|
1044 |
<div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
|
|
|
1045 |
<div class="long">
|
|
|
1046 |
Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>) <div class="mdetail-params">
|
|
|
1047 |
<strong>Parameters:</strong>
|
|
|
1048 |
<ul><li>None.</li> </ul>
|
|
|
1049 |
<strong>Returns:</strong>
|
|
|
1050 |
<ul>
|
|
|
1051 |
<li><code>void</code></li>
|
|
|
1052 |
</ul>
|
|
|
1053 |
</div>
|
|
|
1054 |
</div>
|
|
|
1055 |
</div>
|
|
|
1056 |
</td>
|
|
|
1057 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
|
|
|
1058 |
</tr>
|
|
|
1059 |
<tr class="method-row expandable">
|
|
|
1060 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1061 |
<td class="sig">
|
|
|
1062 |
<a id="Ext.data.Store-setDefaultSort"></a>
|
|
|
1063 |
<b>setDefaultSort</b>( <code>String fieldName</code>, <span class="optional" title="Optional">[<code>String dir</code>]</span> ) : void <div class="mdesc">
|
|
|
1064 |
<div class="short">Sets the default sort column and order to be used by the next load operation.</div>
|
|
|
1065 |
<div class="long">
|
|
|
1066 |
Sets the default sort column and order to be used by the next load operation. <div class="mdetail-params">
|
|
|
1067 |
<strong>Parameters:</strong>
|
|
|
1068 |
<ul><li><code>fieldName</code> : String<div class="sub-desc">The name of the field to sort by.</div></li><li><code>dir</code> : String<div class="sub-desc">(optional) The sort order, "ASC" or "DESC" (case-sensitive, defaults to "ASC")</div></li> </ul>
|
|
|
1069 |
<strong>Returns:</strong>
|
|
|
1070 |
<ul>
|
|
|
1071 |
<li><code>void</code></li>
|
|
|
1072 |
</ul>
|
|
|
1073 |
</div>
|
|
|
1074 |
</div>
|
|
|
1075 |
</div>
|
|
|
1076 |
</td>
|
|
|
1077 |
<td class="msource">Store</td>
|
|
|
1078 |
</tr>
|
|
|
1079 |
<tr class="method-row alt expandable">
|
|
|
1080 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1081 |
<td class="sig">
|
|
|
1082 |
<a id="Ext.data.Store-sort"></a>
|
|
|
1083 |
<b>sort</b>( <code>String fieldName</code>, <span class="optional" title="Optional">[<code>String dir</code>]</span> ) : void <div class="mdesc">
|
|
|
1084 |
<div class="short">Sort the Records.
|
|
|
1085 |
If remote sorting is used, the sort is performed on the server, and the cache is
|
|
|
1086 |
reloaded. If local...</div>
|
|
|
1087 |
<div class="long">
|
|
|
1088 |
Sort the Records.
|
|
|
1089 |
If remote sorting is used, the sort is performed on the server, and the cache is
|
|
|
1090 |
reloaded. If local sorting is used, the cache is sorted internally. <div class="mdetail-params">
|
|
|
1091 |
<strong>Parameters:</strong>
|
|
|
1092 |
<ul><li><code>fieldName</code> : String<div class="sub-desc">The name of the field to sort by.</div></li><li><code>dir</code> : String<div class="sub-desc">(optional) The sort order, "ASC" or "DESC" (case-sensitive, defaults to "ASC")</div></li> </ul>
|
|
|
1093 |
<strong>Returns:</strong>
|
|
|
1094 |
<ul>
|
|
|
1095 |
<li><code>void</code></li>
|
|
|
1096 |
</ul>
|
|
|
1097 |
</div>
|
|
|
1098 |
</div>
|
|
|
1099 |
</div>
|
|
|
1100 |
</td>
|
|
|
1101 |
<td class="msource">Store</td>
|
|
|
1102 |
</tr>
|
|
|
1103 |
<tr class="method-row expandable">
|
|
|
1104 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1105 |
<td class="sig">
|
|
|
1106 |
<a id="Ext.data.Store-sum"></a>
|
|
|
1107 |
<b>sum</b>( <code>String property</code>, <code>Number start</code>, <code>Number end</code> ) : Number <div class="mdesc">
|
|
|
1108 |
<div class="short">Sums the value of <i>property</i> for each record between start and end and returns the result.</div>
|
|
|
1109 |
<div class="long">
|
|
|
1110 |
Sums the value of <i>property</i> for each record between start and end and returns the result. <div class="mdetail-params">
|
|
|
1111 |
<strong>Parameters:</strong>
|
|
|
1112 |
<ul><li><code>property</code> : String<div class="sub-desc">A field on your records</div></li><li><code>start</code> : Number<div class="sub-desc">The record index to start at (defaults to 0)</div></li><li><code>end</code> : Number<div class="sub-desc">The last record index to include (defaults to length - 1)</div></li> </ul>
|
|
|
1113 |
<strong>Returns:</strong>
|
|
|
1114 |
<ul>
|
|
|
1115 |
<li><code>Number</code><div class="sub-desc">The sum</div></li>
|
|
|
1116 |
</ul>
|
|
|
1117 |
</div>
|
|
|
1118 |
</div>
|
|
|
1119 |
</div>
|
|
|
1120 |
</td>
|
|
|
1121 |
<td class="msource">Store</td>
|
|
|
1122 |
</tr>
|
|
|
1123 |
<tr class="method-row inherited alt expandable">
|
|
|
1124 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1125 |
<td class="sig">
|
|
|
1126 |
<a id="Ext.data.Store-suspendEvents"></a>
|
|
|
1127 |
<b>suspendEvents</b>() : void <div class="mdesc">
|
|
|
1128 |
<div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
|
|
|
1129 |
<div class="long">
|
|
|
1130 |
Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>) <div class="mdetail-params">
|
|
|
1131 |
<strong>Parameters:</strong>
|
|
|
1132 |
<ul><li>None.</li> </ul>
|
|
|
1133 |
<strong>Returns:</strong>
|
|
|
1134 |
<ul>
|
|
|
1135 |
<li><code>void</code></li>
|
|
|
1136 |
</ul>
|
|
|
1137 |
</div>
|
|
|
1138 |
</div>
|
|
|
1139 |
</div>
|
|
|
1140 |
</td>
|
|
|
1141 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
|
|
|
1142 |
</tr>
|
|
|
1143 |
<tr class="method-row inherited expandable">
|
|
|
1144 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1145 |
<td class="sig">
|
|
|
1146 |
<a id="Ext.data.Store-un"></a>
|
|
|
1147 |
<b>un</b>( <code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
|
|
|
1148 |
<div class="short">Removes a listener (shorthand for removeListener)</div>
|
|
|
1149 |
<div class="long">
|
|
|
1150 |
Removes a listener (shorthand for removeListener) <div class="mdetail-params">
|
|
|
1151 |
<strong>Parameters:</strong>
|
|
|
1152 |
<ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li> </ul>
|
|
|
1153 |
<strong>Returns:</strong>
|
|
|
1154 |
<ul>
|
|
|
1155 |
<li><code>void</code></li>
|
|
|
1156 |
</ul>
|
|
|
1157 |
</div>
|
|
|
1158 |
</div>
|
|
|
1159 |
</div>
|
|
|
1160 |
</td>
|
|
|
1161 |
<td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
|
|
|
1162 |
</tr>
|
|
|
1163 |
</table>
|
|
|
1164 |
<a id="Ext.data.Store-events"></a>
|
|
|
1165 |
<h2>Public Events</h2>
|
|
|
1166 |
<table cellspacing="0" class="member-table">
|
|
|
1167 |
<tr>
|
|
|
1168 |
<th class="sig-header" colspan="2">Event</th>
|
|
|
1169 |
<th class="msource-header">Defined By</th>
|
|
|
1170 |
</tr>
|
|
|
1171 |
<tr class="event-row expandable">
|
|
|
1172 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1173 |
<td class="sig">
|
|
|
1174 |
<a id="Ext.data.Store-add"></a>
|
|
|
1175 |
<b>add</b> : ( <code>Store this</code>, <code>Ext.data.Record[] records</code>, <code>Number index</code> ) <div class="mdesc">
|
|
|
1176 |
<div class="short">Fires when Records have been added to the Store</div>
|
|
|
1177 |
<div class="long">
|
|
|
1178 |
Fires when Records have been added to the Store <div class="mdetail-params">
|
|
|
1179 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1180 |
<ul><li><code>this</code> : Store<div class="sub-desc"></div></li><li><code>records</code> : Ext.data.Record[]<div class="sub-desc">The array of Records added</div></li><li><code>index</code> : Number<div class="sub-desc">The index at which the record(s) were added</div></li> </ul>
|
|
|
1181 |
</div>
|
|
|
1182 |
</div>
|
|
|
1183 |
</div>
|
|
|
1184 |
</td>
|
|
|
1185 |
<td class="msource">Store</td>
|
|
|
1186 |
</tr>
|
|
|
1187 |
<tr class="event-row alt expandable">
|
|
|
1188 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1189 |
<td class="sig">
|
|
|
1190 |
<a id="Ext.data.Store-beforeload"></a>
|
|
|
1191 |
<b>beforeload</b> : ( <code>Store this</code>, <code>Object options</code> ) <div class="mdesc">
|
|
|
1192 |
<div class="short">Fires before a request is made for a new data object. If the beforeload handler returns false
|
|
|
1193 |
the load action will b...</div>
|
|
|
1194 |
<div class="long">
|
|
|
1195 |
Fires before a request is made for a new data object. If the beforeload handler returns false
|
|
|
1196 |
the load action will be canceled. <div class="mdetail-params">
|
|
|
1197 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1198 |
<ul><li><code>this</code> : Store<div class="sub-desc"></div></li><li><code>options</code> : Object<div class="sub-desc">The loading options that were specified (see <a ext:cls="Ext.data.Store" ext:member="load" href="output/Ext.data.Store.html#load">load</a> for details)</div></li> </ul>
|
|
|
1199 |
</div>
|
|
|
1200 |
</div>
|
|
|
1201 |
</div>
|
|
|
1202 |
</td>
|
|
|
1203 |
<td class="msource">Store</td>
|
|
|
1204 |
</tr>
|
|
|
1205 |
<tr class="event-row expandable">
|
|
|
1206 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1207 |
<td class="sig">
|
|
|
1208 |
<a id="Ext.data.Store-clear"></a>
|
|
|
1209 |
<b>clear</b> : ( <code>Store this</code> ) <div class="mdesc">
|
|
|
1210 |
<div class="short">Fires when the data cache has been cleared.</div>
|
|
|
1211 |
<div class="long">
|
|
|
1212 |
Fires when the data cache has been cleared. <div class="mdetail-params">
|
|
|
1213 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1214 |
<ul><li><code>this</code> : Store<div class="sub-desc"></div></li> </ul>
|
|
|
1215 |
</div>
|
|
|
1216 |
</div>
|
|
|
1217 |
</div>
|
|
|
1218 |
</td>
|
|
|
1219 |
<td class="msource">Store</td>
|
|
|
1220 |
</tr>
|
|
|
1221 |
<tr class="event-row alt expandable">
|
|
|
1222 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1223 |
<td class="sig">
|
|
|
1224 |
<a id="Ext.data.Store-datachanged"></a>
|
|
|
1225 |
<b>datachanged</b> : ( <code>Store this</code> ) <div class="mdesc">
|
|
|
1226 |
<div class="short">Fires when the data cache has changed, and a widget which is using this Store
|
|
|
1227 |
as a Record cache should refresh its view.</div>
|
|
|
1228 |
<div class="long">
|
|
|
1229 |
Fires when the data cache has changed, and a widget which is using this Store
|
|
|
1230 |
as a Record cache should refresh its view. <div class="mdetail-params">
|
|
|
1231 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1232 |
<ul><li><code>this</code> : Store<div class="sub-desc"></div></li> </ul>
|
|
|
1233 |
</div>
|
|
|
1234 |
</div>
|
|
|
1235 |
</div>
|
|
|
1236 |
</td>
|
|
|
1237 |
<td class="msource">Store</td>
|
|
|
1238 |
</tr>
|
|
|
1239 |
<tr class="event-row expandable">
|
|
|
1240 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1241 |
<td class="sig">
|
|
|
1242 |
<a id="Ext.data.Store-load"></a>
|
|
|
1243 |
<b>load</b> : ( <code>Store this</code>, <code>Ext.data.Record[] records</code>, <code>Object options</code> ) <div class="mdesc">
|
|
|
1244 |
<div class="short">Fires after a new set of Records has been loaded.</div>
|
|
|
1245 |
<div class="long">
|
|
|
1246 |
Fires after a new set of Records has been loaded. <div class="mdetail-params">
|
|
|
1247 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1248 |
<ul><li><code>this</code> : Store<div class="sub-desc"></div></li><li><code>records</code> : Ext.data.Record[]<div class="sub-desc">The Records that were loaded</div></li><li><code>options</code> : Object<div class="sub-desc">The loading options that were specified (see <a ext:cls="Ext.data.Store" ext:member="load" href="output/Ext.data.Store.html#load">load</a> for details)</div></li> </ul>
|
|
|
1249 |
</div>
|
|
|
1250 |
</div>
|
|
|
1251 |
</div>
|
|
|
1252 |
</td>
|
|
|
1253 |
<td class="msource">Store</td>
|
|
|
1254 |
</tr>
|
|
|
1255 |
<tr class="event-row alt expandable">
|
|
|
1256 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1257 |
<td class="sig">
|
|
|
1258 |
<a id="Ext.data.Store-loadexception"></a>
|
|
|
1259 |
<b>loadexception</b> : () <div class="mdesc">
|
|
|
1260 |
<div class="short">Fires if an exception occurs in the Proxy during loading.
|
|
|
1261 |
Called with the signature of the Proxy's "loadexception" ev...</div>
|
|
|
1262 |
<div class="long">
|
|
|
1263 |
Fires if an exception occurs in the Proxy during loading.
|
|
|
1264 |
Called with the signature of the Proxy's "loadexception" event. <div class="mdetail-params">
|
|
|
1265 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1266 |
<ul><li>None.</li> </ul>
|
|
|
1267 |
</div>
|
|
|
1268 |
</div>
|
|
|
1269 |
</div>
|
|
|
1270 |
</td>
|
|
|
1271 |
<td class="msource">Store</td>
|
|
|
1272 |
</tr>
|
|
|
1273 |
<tr class="event-row expandable">
|
|
|
1274 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1275 |
<td class="sig">
|
|
|
1276 |
<a id="Ext.data.Store-metachange"></a>
|
|
|
1277 |
<b>metachange</b> : ( <code>Store this</code>, <code>Object meta</code> ) <div class="mdesc">
|
|
|
1278 |
<div class="short">Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders.</div>
|
|
|
1279 |
<div class="long">
|
|
|
1280 |
Fires when this store's reader provides new metadata (fields). This is currently only supported for JsonReaders. <div class="mdetail-params">
|
|
|
1281 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1282 |
<ul><li><code>this</code> : Store<div class="sub-desc"></div></li><li><code>meta</code> : Object<div class="sub-desc">The JSON metadata</div></li> </ul>
|
|
|
1283 |
</div>
|
|
|
1284 |
</div>
|
|
|
1285 |
</div>
|
|
|
1286 |
</td>
|
|
|
1287 |
<td class="msource">Store</td>
|
|
|
1288 |
</tr>
|
|
|
1289 |
<tr class="event-row alt expandable">
|
|
|
1290 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1291 |
<td class="sig">
|
|
|
1292 |
<a id="Ext.data.Store-remove"></a>
|
|
|
1293 |
<b>remove</b> : ( <code>Store this</code>, <code>Ext.data.Record record</code>, <code>Number index</code> ) <div class="mdesc">
|
|
|
1294 |
<div class="short">Fires when a Record has been removed from the Store</div>
|
|
|
1295 |
<div class="long">
|
|
|
1296 |
Fires when a Record has been removed from the Store <div class="mdetail-params">
|
|
|
1297 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1298 |
<ul><li><code>this</code> : Store<div class="sub-desc"></div></li><li><code>record</code> : Ext.data.Record<div class="sub-desc">The Record that was removed</div></li><li><code>index</code> : Number<div class="sub-desc">The index at which the record was removed</div></li> </ul>
|
|
|
1299 |
</div>
|
|
|
1300 |
</div>
|
|
|
1301 |
</div>
|
|
|
1302 |
</td>
|
|
|
1303 |
<td class="msource">Store</td>
|
|
|
1304 |
</tr>
|
|
|
1305 |
<tr class="event-row expandable">
|
|
|
1306 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
1307 |
<td class="sig">
|
|
|
1308 |
<a id="Ext.data.Store-update"></a>
|
|
|
1309 |
<b>update</b> : ( <code>Store this</code>, <code>Ext.data.Record record</code>, <code>String operation</code> ) <div class="mdesc">
|
|
|
1310 |
<div class="short">Fires when a Record has been updated</div>
|
|
|
1311 |
<div class="long">
|
|
|
1312 |
Fires when a Record has been updated <div class="mdetail-params">
|
|
|
1313 |
<strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
|
|
|
1314 |
<ul><li><code>this</code> : Store<div class="sub-desc"></div></li><li><code>record</code> : Ext.data.Record<div class="sub-desc">The Record that was updated</div></li><li><code>operation</code> : String<div class="sub-desc">The update operation being performed. Value may be one of:
|
|
|
1315 |
<pre><code>Ext.data.Record.EDIT
|
|
|
1316 |
Ext.data.Record.REJECT
|
|
|
1317 |
Ext.data.Record.COMMIT</code></pre></div></li> </ul>
|
|
|
1318 |
</div>
|
|
|
1319 |
</div>
|
|
|
1320 |
</div>
|
|
|
1321 |
</td>
|
|
|
1322 |
<td class="msource">Store</td>
|
|
|
1323 |
</tr>
|
|
|
1324 |
</table>
|
|
|
1325 |
|
|
|
1326 |
</div>
|