1 <div class="body-wrap">
2 <div class="top-tools">
3 <a class="inner-link" href="#Ext.StoreMgr-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4 <a class="inner-link" href="#Ext.StoreMgr-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5 <a class="inner-link" href="#Ext.StoreMgr-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6 <a class="bookmark" href="../docs/?class=Ext.StoreMgr"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
8 <div class="inheritance res-block">
9 <pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
10 <img src="resources/elbow-end.gif"/><a ext:cls="Ext.util.MixedCollection" ext:member="" href="output/Ext.util.MixedCollection.html">MixedCollection</a>
11 <img src="resources/elbow-end.gif"/>StoreMgr</pre></div>
12 <h1>Class Ext.StoreMgr</h1>
13 <table cellspacing="0">
14 <tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr>
15 <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/StoreMgr.js" target="_blank">StoreMgr.js</a></td></tr>
16 <tr><td class="label">Class:</td><td class="hd-info">StoreMgr</td></tr>
17 <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.MixedCollection" ext:member="" href="output/Ext.util.MixedCollection.html">MixedCollection</a></td></tr>
19 <div class="description">
21 The default global group of stores.<br><br><i>This class is a singleton and cannot be created directly.</i> </div>
23 <div class="hr"></div>
24 <a id="Ext.StoreMgr-props"></a>
25 <h2>Public Properties</h2>
26 <div class="no-members">This class has no public properties.</div> <a id="Ext.StoreMgr-methods"></a>
27 <h2>Public Methods</h2>
28 <table cellspacing="0" class="member-table">
30 <th class="sig-header" colspan="2">Method</th>
31 <th class="msource-header">Defined By</th>
33 <tr class="method-row inherited expandable">
\r
34 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
36 <a id="Ext.StoreMgr-add"></a>
\r
37 <b>add</b>( <code>String key</code>, <code>Object o</code> ) : Object <div class="mdesc">
\r
38 <div class="short">Adds an item to the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete.</div>
\r
40 Adds an item to the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete. <div class="mdetail-params">
\r
41 <strong>Parameters:</strong>
\r
42 <ul><li><code>key</code> : String<div class="sub-desc"><p>The key to associate with the item, or the new item.</p>
43 <p>If you supplied a <a ext:cls="Ext.util.MixedCollection" ext:member="getKey" href="output/Ext.util.MixedCollection.html#getKey">getKey</a> implementation for this MixedCollection, or if the key
44 of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
45 will be able to <i>derive</i> the key for the new item. In this case just pass the new item in
46 this parameter.</p></div></li><li><code>o</code> : Object<div class="sub-desc">The item to add.</div></li> </ul>
\r
47 <strong>Returns:</strong>
\r
49 <li><code>Object</code><div class="sub-desc">The item added.</div></li>
\r
55 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#add" href="output/Ext.util.MixedCollection.html#add">MixedCollection</a></td>
\r
57 <tr class="method-row inherited alt expandable">
\r
58 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
60 <a id="Ext.StoreMgr-addAll"></a>
\r
61 <b>addAll</b>( <code>Object/Array objs</code> ) : void <div class="mdesc">
\r
62 <div class="short">Adds all elements of an Array or an Object to the collection.</div>
\r
64 Adds all elements of an Array or an Object to the collection. <div class="mdetail-params">
\r
65 <strong>Parameters:</strong>
\r
66 <ul><li><code>objs</code> : Object/Array<div class="sub-desc">An Object containing properties which will be added to the collection, or
67 an Array of values, each of which are added to the collection.</div></li> </ul>
\r
68 <strong>Returns:</strong>
\r
70 <li><code>void</code></li>
\r
76 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#addAll" href="output/Ext.util.MixedCollection.html#addAll">MixedCollection</a></td>
\r
78 <tr class="method-row inherited expandable">
\r
79 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
81 <a id="Ext.StoreMgr-addEvents"></a>
\r
82 <b>addEvents</b>( <code>Object object</code> ) : void <div class="mdesc">
\r
83 <div class="short">Used to define events on this Observable</div>
\r
85 Used to define events on this Observable <div class="mdetail-params">
\r
86 <strong>Parameters:</strong>
\r
87 <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li> </ul>
\r
88 <strong>Returns:</strong>
\r
90 <li><code>void</code></li>
\r
96 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
\r
98 <tr class="method-row inherited alt expandable">
\r
99 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
101 <a id="Ext.StoreMgr-addListener"></a>
\r
102 <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">
\r
103 <div class="short">Appends an event handler to this component</div>
\r
105 Appends an event handler to this component <div class="mdetail-params">
\r
106 <strong>Parameters:</strong>
\r
107 <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
108 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
109 properties. This may contain any of the following properties:<ul>
110 <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>
111 <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>
112 <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>
113 <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
114 by the specified number of milliseconds. If the event fires again within that time, the original
115 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
118 <b>Combining Options</b><br>
119 Using the options argument, it is possible to combine different types of listeners:<br>
121 A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
122 <pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
128 <b>Attaching multiple handlers in 1 call</b><br>
129 The method also allows for a single argument to be passed which is a config object containing properties
130 which specify multiple handlers.
134 fn: <b>this</b>.onClick,
138 <em>'mouseover'</em> : {
139 fn: <b>this</b>.onMouseOver,
142 <em>'mouseout'</em> : {
143 fn: <b>this</b>.onMouseOut,
148 Or a shorthand syntax:<br>
150 <em>'click'</em> : <b>this</b>.onClick,
151 <em>'mouseover'</em> : <b>this</b>.onMouseOver,
152 <em>'mouseout'</em> : <b>this</b>.onMouseOut,
154 });</code></pre></div></li> </ul>
\r
155 <strong>Returns:</strong>
\r
157 <li><code>void</code></li>
\r
163 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
\r
165 <tr class="method-row inherited expandable">
\r
166 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
168 <a id="Ext.StoreMgr-clear"></a>
\r
169 <b>clear</b>() : void <div class="mdesc">
\r
170 <div class="short">Removes all items from the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="clear" href="output/Ext.util.MixedCollection.html#clear">clear</a> event when complete.</div>
\r
172 Removes all items from the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="clear" href="output/Ext.util.MixedCollection.html#clear">clear</a> event when complete. <div class="mdetail-params">
\r
173 <strong>Parameters:</strong>
\r
174 <ul><li>None.</li> </ul>
\r
175 <strong>Returns:</strong>
\r
177 <li><code>void</code></li>
\r
183 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#clear" href="output/Ext.util.MixedCollection.html#clear">MixedCollection</a></td>
\r
185 <tr class="method-row inherited alt expandable">
\r
186 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
188 <a id="Ext.StoreMgr-clone"></a>
\r
189 <b>clone</b>() : MixedCollection <div class="mdesc">
\r
190 <div class="short">Creates a shallow copy of this collection</div>
\r
192 Creates a shallow copy of this collection <div class="mdetail-params">
\r
193 <strong>Parameters:</strong>
\r
194 <ul><li>None.</li> </ul>
\r
195 <strong>Returns:</strong>
\r
197 <li><code>MixedCollection</code></li>
\r
203 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#clone" href="output/Ext.util.MixedCollection.html#clone">MixedCollection</a></td>
\r
205 <tr class="method-row inherited expandable">
\r
206 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
208 <a id="Ext.StoreMgr-contains"></a>
\r
209 <b>contains</b>( <code>Object o</code> ) : Boolean <div class="mdesc">
\r
210 <div class="short">Returns true if the collection contains the passed Object as an item.</div>
\r
212 Returns true if the collection contains the passed Object as an item. <div class="mdetail-params">
\r
213 <strong>Parameters:</strong>
\r
214 <ul><li><code>o</code> : Object<div class="sub-desc">The Object to look for in the collection.</div></li> </ul>
\r
215 <strong>Returns:</strong>
\r
217 <li><code>Boolean</code><div class="sub-desc">True if the collection contains the Object as an item.</div></li>
\r
223 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#contains" href="output/Ext.util.MixedCollection.html#contains">MixedCollection</a></td>
\r
225 <tr class="method-row inherited alt expandable">
\r
226 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
228 <a id="Ext.StoreMgr-containsKey"></a>
\r
229 <b>containsKey</b>( <code>String key</code> ) : Boolean <div class="mdesc">
\r
230 <div class="short">Returns true if the collection contains the passed Object as a key.</div>
\r
232 Returns true if the collection contains the passed Object as a key. <div class="mdetail-params">
\r
233 <strong>Parameters:</strong>
\r
234 <ul><li><code>key</code> : String<div class="sub-desc">The key to look for in the collection.</div></li> </ul>
\r
235 <strong>Returns:</strong>
\r
237 <li><code>Boolean</code><div class="sub-desc">True if the collection contains the Object as a key.</div></li>
\r
243 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#containsKey" href="output/Ext.util.MixedCollection.html#containsKey">MixedCollection</a></td>
\r
245 <tr class="method-row inherited expandable">
\r
246 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
248 <a id="Ext.StoreMgr-each"></a>
\r
249 <b>each</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
250 <div class="short">Executes the specified function once for every item in the collection, passing the following arguments:
252 item : Mixed...</div>
\r
254 Executes the specified function once for every item in the collection, passing the following arguments:
255 <div class="mdetail-params"><ul>
256 <li><b>item</b> : Mixed<p class="sub-desc">The collection item</p></li>
257 <li><b>index</b> : Number<p class="sub-desc">The item's index</p></li>
258 <li><b>length</b> : Number<p class="sub-desc">The total number of items in the collection</p></li>
260 The function should return a boolean value. Returning false from the function will stop the iteration. <div class="mdetail-params">
\r
261 <strong>Parameters:</strong>
\r
262 <ul><li><code>fn</code> : Function<div class="sub-desc">The function to execute for each item.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the function.</div></li> </ul>
\r
263 <strong>Returns:</strong>
\r
265 <li><code>void</code></li>
\r
271 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#each" href="output/Ext.util.MixedCollection.html#each">MixedCollection</a></td>
\r
273 <tr class="method-row inherited alt expandable">
\r
274 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
276 <a id="Ext.StoreMgr-eachKey"></a>
\r
277 <b>eachKey</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : void <div class="mdesc">
\r
278 <div class="short">Executes the specified function once for every key in the collection, passing each
279 key, and its associated item as th...</div>
\r
281 Executes the specified function once for every key in the collection, passing each
282 key, and its associated item as the first two parameters. <div class="mdetail-params">
\r
283 <strong>Parameters:</strong>
\r
284 <ul><li><code>fn</code> : Function<div class="sub-desc">The function to execute for each item.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the function.</div></li> </ul>
\r
285 <strong>Returns:</strong>
\r
287 <li><code>void</code></li>
\r
293 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#eachKey" href="output/Ext.util.MixedCollection.html#eachKey">MixedCollection</a></td>
\r
295 <tr class="method-row inherited expandable">
\r
296 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
298 <a id="Ext.StoreMgr-filter"></a>
\r
299 <b>filter</b>( <code>String property</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">
\r
300 <div class="short">Filter the <i>objects</i> in this collection by a specific property.
301 Returns a new collection that has been filtered.</div>
\r
303 Filter the <i>objects</i> in this collection by a specific property.
304 Returns a new collection that has been filtered. <div class="mdetail-params">
\r
305 <strong>Parameters:</strong>
\r
306 <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
307 should start with or a RegExp to test against the property</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 (defaults to False).</div></li> </ul>
\r
308 <strong>Returns:</strong>
\r
310 <li><code>MixedCollection</code><div class="sub-desc">The new filtered collection</div></li>
\r
316 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#filter" href="output/Ext.util.MixedCollection.html#filter">MixedCollection</a></td>
\r
318 <tr class="method-row inherited alt expandable">
\r
319 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
321 <a id="Ext.StoreMgr-filterBy"></a>
\r
322 <b>filterBy</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : MixedCollection <div class="mdesc">
\r
323 <div class="short">Filter by a function. Returns a new collection that has been filtered.
324 The passed function will be called with each o...</div>
\r
326 Filter by a function. Returns a <i>new</i> collection that has been filtered.
327 The passed function will be called with each object in the collection.
328 If the function returns true, the value is included otherwise it is filtered. <div class="mdetail-params">
\r
329 <strong>Parameters:</strong>
\r
330 <ul><li><code>fn</code> : Function<div class="sub-desc">The function to be called, it will receive the args o (the object), k (the key)</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the function (defaults to this)</div></li> </ul>
\r
331 <strong>Returns:</strong>
\r
333 <li><code>MixedCollection</code><div class="sub-desc">The new filtered collection</div></li>
\r
339 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#filterBy" href="output/Ext.util.MixedCollection.html#filterBy">MixedCollection</a></td>
\r
341 <tr class="method-row inherited expandable">
\r
342 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
344 <a id="Ext.StoreMgr-find"></a>
\r
345 <b>find</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : Object <div class="mdesc">
\r
346 <div class="short">Returns the first item in the collection which elicits a true return value from the
347 passed selection function.</div>
\r
349 Returns the first item in the collection which elicits a true return value from the
350 passed selection function. <div class="mdetail-params">
\r
351 <strong>Parameters:</strong>
\r
352 <ul><li><code>fn</code> : Function<div class="sub-desc">The selection function to execute for each item.</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the function.</div></li> </ul>
\r
353 <strong>Returns:</strong>
\r
355 <li><code>Object</code><div class="sub-desc">The first item in the collection which returned true from the selection function.</div></li>
\r
361 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#find" href="output/Ext.util.MixedCollection.html#find">MixedCollection</a></td>
\r
363 <tr class="method-row inherited alt expandable">
\r
364 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
366 <a id="Ext.StoreMgr-findIndex"></a>
\r
367 <b>findIndex</b>( <code>String property</code>, <code>String/RegExp value</code>, <span class="optional" title="Optional">[<code>Number start</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">
\r
368 <div class="short">Finds the index of the first matching object in this collection by a specific property/value.</div>
\r
370 Finds the index of the first matching object in this collection by a specific property/value. <div class="mdetail-params">
\r
371 <strong>Parameters:</strong>
\r
372 <ul><li><code>property</code> : String<div class="sub-desc">The name of a property on your objects.</div></li><li><code>value</code> : String/RegExp<div class="sub-desc">A string that the property values
373 should start with or a RegExp to test against the property.</div></li><li><code>start</code> : Number<div class="sub-desc">(optional) The index to start searching at (defaults to 0).</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>
\r
374 <strong>Returns:</strong>
\r
376 <li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>
\r
382 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#findIndex" href="output/Ext.util.MixedCollection.html#findIndex">MixedCollection</a></td>
\r
384 <tr class="method-row inherited expandable">
\r
385 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
387 <a id="Ext.StoreMgr-findIndexBy"></a>
\r
388 <b>findIndexBy</b>( <code>Function fn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Number start</code>]</span> ) : Number <div class="mdesc">
\r
389 <div class="short">Find the index of the first matching object in this collection by a function.
390 If the function returns true it is cons...</div>
\r
392 Find the index of the first matching object in this collection by a function.
393 If the function returns <i>true</i> it is considered a match. <div class="mdetail-params">
\r
394 <strong>Parameters:</strong>
\r
395 <ul><li><code>fn</code> : Function<div class="sub-desc">The function to be called, it will receive the args o (the object), k (the key).</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the function (defaults to this).</div></li><li><code>start</code> : Number<div class="sub-desc">(optional) The index to start searching at (defaults to 0).</div></li> </ul>
\r
396 <strong>Returns:</strong>
\r
398 <li><code>Number</code><div class="sub-desc">The matched index or -1</div></li>
\r
404 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#findIndexBy" href="output/Ext.util.MixedCollection.html#findIndexBy">MixedCollection</a></td>
\r
406 <tr class="method-row inherited alt expandable">
\r
407 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
409 <a id="Ext.StoreMgr-fireEvent"></a>
\r
410 <b>fireEvent</b>( <code>String eventName</code>, <code>Object... args</code> ) : Boolean <div class="mdesc">
\r
411 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
\r
413 Fires the specified event with the passed parameters (minus the event name). <div class="mdetail-params">
\r
414 <strong>Parameters:</strong>
\r
415 <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>
\r
416 <strong>Returns:</strong>
\r
418 <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
\r
424 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
\r
426 <tr class="method-row inherited expandable">
\r
427 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
429 <a id="Ext.StoreMgr-first"></a>
\r
430 <b>first</b>() : Object <div class="mdesc">
\r
431 <div class="short">Returns the first item in the collection.</div>
\r
433 Returns the first item in the collection. <div class="mdetail-params">
\r
434 <strong>Parameters:</strong>
\r
435 <ul><li>None.</li> </ul>
\r
436 <strong>Returns:</strong>
\r
438 <li><code>Object</code><div class="sub-desc">the first item in the collection..</div></li>
\r
444 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#first" href="output/Ext.util.MixedCollection.html#first">MixedCollection</a></td>
\r
446 <tr class="method-row inherited alt expandable">
\r
447 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
449 <a id="Ext.StoreMgr-get"></a>
\r
450 <b>get</b>( <code>String/Number key</code> ) : Object <div class="mdesc">
\r
451 <div class="short">Returns the item associated with the passed key or index.</div>
\r
453 Returns the item associated with the passed key or index. <div class="mdetail-params">
\r
454 <strong>Parameters:</strong>
\r
455 <ul><li><code>key</code> : String/Number<div class="sub-desc">The key or index of the item.</div></li> </ul>
\r
456 <strong>Returns:</strong>
\r
458 <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
\r
464 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#get" href="output/Ext.util.MixedCollection.html#get">MixedCollection</a></td>
\r
466 <tr class="method-row inherited expandable">
\r
467 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
469 <a id="Ext.StoreMgr-getCount"></a>
\r
470 <b>getCount</b>() : Number <div class="mdesc">
\r
471 <div class="short">Returns the number of items in the collection.</div>
\r
473 Returns the number of items in the collection. <div class="mdetail-params">
\r
474 <strong>Parameters:</strong>
\r
475 <ul><li>None.</li> </ul>
\r
476 <strong>Returns:</strong>
\r
478 <li><code>Number</code><div class="sub-desc">the number of items in the collection.</div></li>
\r
484 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#getCount" href="output/Ext.util.MixedCollection.html#getCount">MixedCollection</a></td>
\r
486 <tr class="method-row inherited alt expandable">
\r
487 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
489 <a id="Ext.StoreMgr-getKey"></a>
\r
490 <b>getKey</b>( <code>Object item</code> ) : Object <div class="mdesc">
\r
491 <div class="short">MixedCollection has a generic way to fetch keys if you implement getKey. The default implementation
492 simply returns i...</div>
\r
494 MixedCollection has a generic way to fetch keys if you implement getKey. The default implementation
495 simply returns <tt style="font-weight:bold;">item.id</tt> but you can provide your own implementation
496 to return a different value as in the following examples:
\r
497 <pre><code><i>// normal way</i>
498 <b>var</b> mc = <b>new</b> Ext.util.MixedCollection();
499 mc.add(someEl.dom.id, someEl);
500 mc.add(otherEl.dom.id, otherEl);
503 <i>// using getKey</i>
504 <b>var</b> mc = <b>new</b> Ext.util.MixedCollection();
505 mc.getKey = <b>function</b>(el){
506 <b>return</b> el.dom.id;
511 <i>// or via the constructor</i>
512 <b>var</b> mc = <b>new</b> Ext.util.MixedCollection(false, <b>function</b>(el){
513 <b>return</b> el.dom.id;
516 mc.add(otherEl);</code></pre> <div class="mdetail-params">
\r
517 <strong>Parameters:</strong>
\r
518 <ul><li><code>item</code> : Object<div class="sub-desc">The item for which to find the key.</div></li> </ul>
\r
519 <strong>Returns:</strong>
\r
521 <li><code>Object</code><div class="sub-desc">The key for the passed item.</div></li>
\r
527 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#getKey" href="output/Ext.util.MixedCollection.html#getKey">MixedCollection</a></td>
\r
529 <tr class="method-row inherited expandable">
\r
530 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
532 <a id="Ext.StoreMgr-getRange"></a>
\r
533 <b>getRange</b>( <span class="optional" title="Optional">[<code>Number startIndex</code>]</span>, <span class="optional" title="Optional">[<code>Number endIndex</code>]</span> ) : Array <div class="mdesc">
\r
534 <div class="short">Returns a range of items in this collection</div>
\r
536 Returns a range of items in this collection <div class="mdetail-params">
\r
537 <strong>Parameters:</strong>
\r
538 <ul><li><code>startIndex</code> : Number<div class="sub-desc">(optional) defaults to 0</div></li><li><code>endIndex</code> : Number<div class="sub-desc">(optional) default to the last item</div></li> </ul>
\r
539 <strong>Returns:</strong>
\r
541 <li><code>Array</code><div class="sub-desc">An array of items</div></li>
\r
547 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#getRange" href="output/Ext.util.MixedCollection.html#getRange">MixedCollection</a></td>
\r
549 <tr class="method-row inherited alt expandable">
\r
550 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
552 <a id="Ext.StoreMgr-hasListener"></a>
\r
553 <b>hasListener</b>( <code>String eventName</code> ) : Boolean <div class="mdesc">
\r
554 <div class="short">Checks to see if this object has any listeners for a specified event</div>
\r
556 Checks to see if this object has any listeners for a specified event <div class="mdetail-params">
\r
557 <strong>Parameters:</strong>
\r
558 <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li> </ul>
\r
559 <strong>Returns:</strong>
\r
561 <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
\r
567 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
\r
569 <tr class="method-row inherited expandable">
\r
570 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
572 <a id="Ext.StoreMgr-indexOf"></a>
\r
573 <b>indexOf</b>( <code>Object o</code> ) : Number <div class="mdesc">
\r
574 <div class="short">Returns index within the collection of the passed Object.</div>
\r
576 Returns index within the collection of the passed Object. <div class="mdetail-params">
\r
577 <strong>Parameters:</strong>
\r
578 <ul><li><code>o</code> : Object<div class="sub-desc">The item to find the index of.</div></li> </ul>
\r
579 <strong>Returns:</strong>
\r
581 <li><code>Number</code><div class="sub-desc">index of the item. Returns -1 if not found.</div></li>
\r
587 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#indexOf" href="output/Ext.util.MixedCollection.html#indexOf">MixedCollection</a></td>
\r
589 <tr class="method-row inherited alt expandable">
\r
590 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
592 <a id="Ext.StoreMgr-indexOfKey"></a>
\r
593 <b>indexOfKey</b>( <code>String key</code> ) : Number <div class="mdesc">
\r
594 <div class="short">Returns index within the collection of the passed key.</div>
\r
596 Returns index within the collection of the passed key. <div class="mdetail-params">
\r
597 <strong>Parameters:</strong>
\r
598 <ul><li><code>key</code> : String<div class="sub-desc">The key to find the index of.</div></li> </ul>
\r
599 <strong>Returns:</strong>
\r
601 <li><code>Number</code><div class="sub-desc">index of the key.</div></li>
\r
607 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#indexOfKey" href="output/Ext.util.MixedCollection.html#indexOfKey">MixedCollection</a></td>
\r
609 <tr class="method-row inherited expandable">
\r
610 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
612 <a id="Ext.StoreMgr-insert"></a>
\r
613 <b>insert</b>( <code>Number index</code>, <code>String key</code>, <span class="optional" title="Optional">[<code>Object o</code>]</span> ) : Object <div class="mdesc">
\r
614 <div class="short">Inserts an item at the specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete.</div>
\r
616 Inserts an item at the specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="add" href="output/Ext.util.MixedCollection.html#add">add</a> event when complete. <div class="mdetail-params">
\r
617 <strong>Parameters:</strong>
\r
618 <ul><li><code>index</code> : Number<div class="sub-desc">The index to insert the item at.</div></li><li><code>key</code> : String<div class="sub-desc">The key to associate with the new item, or the item itself.</div></li><li><code>o</code> : Object<div class="sub-desc">(optional) If the second parameter was a key, the new item.</div></li> </ul>
\r
619 <strong>Returns:</strong>
\r
621 <li><code>Object</code><div class="sub-desc">The item inserted.</div></li>
\r
627 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#insert" href="output/Ext.util.MixedCollection.html#insert">MixedCollection</a></td>
\r
629 <tr class="method-row inherited alt expandable">
\r
630 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
632 <a id="Ext.StoreMgr-item"></a>
\r
633 <b>item</b>( <code>String/Number key</code> ) : Object <div class="mdesc">
\r
634 <div class="short">Returns the item associated with the passed key OR index. Key has priority over index. This is the equivalent
637 Returns the item associated with the passed key OR index. Key has priority over index. This is the equivalent
638 of calling <a ext:cls="Ext.util.MixedCollection" ext:member="key" href="output/Ext.util.MixedCollection.html#key">key</a> first, then if nothing matched calling <a ext:cls="Ext.util.MixedCollection" ext:member="itemAt" href="output/Ext.util.MixedCollection.html#itemAt">itemAt</a>. <div class="mdetail-params">
\r
639 <strong>Parameters:</strong>
\r
640 <ul><li><code>key</code> : String/Number<div class="sub-desc">The key or index of the item.</div></li> </ul>
\r
641 <strong>Returns:</strong>
\r
643 <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
\r
649 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#item" href="output/Ext.util.MixedCollection.html#item">MixedCollection</a></td>
\r
651 <tr class="method-row inherited expandable">
\r
652 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
654 <a id="Ext.StoreMgr-itemAt"></a>
\r
655 <b>itemAt</b>( <code>Number index</code> ) : Object <div class="mdesc">
\r
656 <div class="short">Returns the item at the specified index.</div>
\r
658 Returns the item at the specified index. <div class="mdetail-params">
\r
659 <strong>Parameters:</strong>
\r
660 <ul><li><code>index</code> : Number<div class="sub-desc">The index of the item.</div></li> </ul>
\r
661 <strong>Returns:</strong>
\r
663 <li><code>Object</code><div class="sub-desc">The item at the specified index.</div></li>
\r
669 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#itemAt" href="output/Ext.util.MixedCollection.html#itemAt">MixedCollection</a></td>
\r
671 <tr class="method-row inherited alt expandable">
\r
672 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
674 <a id="Ext.StoreMgr-key"></a>
\r
675 <b>key</b>( <code>String/Number key</code> ) : Object <div class="mdesc">
\r
676 <div class="short">Returns the item associated with the passed key.</div>
\r
678 Returns the item associated with the passed key. <div class="mdetail-params">
\r
679 <strong>Parameters:</strong>
\r
680 <ul><li><code>key</code> : String/Number<div class="sub-desc">The key of the item.</div></li> </ul>
\r
681 <strong>Returns:</strong>
\r
683 <li><code>Object</code><div class="sub-desc">The item associated with the passed key.</div></li>
\r
689 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#key" href="output/Ext.util.MixedCollection.html#key">MixedCollection</a></td>
\r
691 <tr class="method-row inherited expandable">
\r
692 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
694 <a id="Ext.StoreMgr-keySort"></a>
\r
695 <b>keySort</b>( <span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span> ) : void <div class="mdesc">
\r
696 <div class="short">Sorts this collection by keys</div>
\r
698 Sorts this collection by keys <div class="mdetail-params">
\r
699 <strong>Parameters:</strong>
\r
700 <ul><li><code>direction</code> : String<div class="sub-desc">(optional) "ASC" or "DESC"</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) a comparison function (defaults to case insensitive string)</div></li> </ul>
\r
701 <strong>Returns:</strong>
\r
703 <li><code>void</code></li>
\r
709 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#keySort" href="output/Ext.util.MixedCollection.html#keySort">MixedCollection</a></td>
\r
711 <tr class="method-row inherited alt expandable">
\r
712 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
714 <a id="Ext.StoreMgr-last"></a>
\r
715 <b>last</b>() : Object <div class="mdesc">
\r
716 <div class="short">Returns the last item in the collection.</div>
\r
718 Returns the last item in the collection. <div class="mdetail-params">
\r
719 <strong>Parameters:</strong>
\r
720 <ul><li>None.</li> </ul>
\r
721 <strong>Returns:</strong>
\r
723 <li><code>Object</code><div class="sub-desc">the last item in the collection..</div></li>
\r
729 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#last" href="output/Ext.util.MixedCollection.html#last">MixedCollection</a></td>
\r
731 <tr class="method-row expandable">
\r
732 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
734 <a id="Ext.StoreMgr-lookup"></a>
\r
735 <b>lookup</b>( <code>String/Object id</code> ) : Ext.data.Store <div class="mdesc">
\r
736 <div class="short">Gets a registered Store by id</div>
\r
738 Gets a registered Store by id <div class="mdetail-params">
\r
739 <strong>Parameters:</strong>
\r
740 <ul><li><code>id</code> : String/Object<div class="sub-desc">The id of the Store, or a Store instance</div></li> </ul>
\r
741 <strong>Returns:</strong>
\r
743 <li><code>Ext.data.Store</code></li>
\r
749 <td class="msource">StoreMgr</td>
\r
751 <tr class="method-row inherited alt expandable">
\r
752 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
754 <a id="Ext.StoreMgr-on"></a>
\r
755 <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">
\r
756 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
\r
758 Appends an event handler to this element (shorthand for addListener) <div class="mdetail-params">
\r
759 <strong>Parameters:</strong>
\r
760 <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
761 function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li> </ul>
\r
762 <strong>Returns:</strong>
\r
764 <li><code>void</code></li>
\r
770 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
\r
772 <tr class="method-row inherited expandable">
\r
773 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
775 <a id="Ext.StoreMgr-purgeListeners"></a>
\r
776 <b>purgeListeners</b>() : void <div class="mdesc">
\r
777 <div class="short">Removes all listeners for this object</div>
\r
779 Removes all listeners for this object <div class="mdetail-params">
\r
780 <strong>Parameters:</strong>
\r
781 <ul><li>None.</li> </ul>
\r
782 <strong>Returns:</strong>
\r
784 <li><code>void</code></li>
\r
790 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
\r
792 <tr class="method-row alt expandable">
\r
793 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
795 <a id="Ext.StoreMgr-register"></a>
\r
796 <b>register</b>( <code>Ext.data.Store store1</code>, <span class="optional" title="Optional">[<code>Ext.data.Store store2</code>]</span>, <span class="optional" title="Optional">[<code>Ext.data.Store etc...</code>]</span> ) : void <div class="mdesc">
\r
798 Registers one or more Stores with the StoreMgr. You do not normally need to register stores
799 manually. Any store ini...</div>
\r
802 Registers one or more Stores with the StoreMgr. You do not normally need to register stores
803 manually. Any store initialized with a <a ext:cls="Ext.data.Store" ext:member="storeId" href="output/Ext.data.Store.html#storeId">Ext.data.Store.storeId</a> will be auto-registered. <div class="mdetail-params">
\r
804 <strong>Parameters:</strong>
\r
805 <ul><li><code>store1</code> : Ext.data.Store<div class="sub-desc">A Store instance</div></li><li><code>store2</code> : Ext.data.Store<div class="sub-desc">(optional)</div></li><li><code>etc...</code> : Ext.data.Store<div class="sub-desc">(optional)</div></li> </ul>
\r
806 <strong>Returns:</strong>
\r
808 <li><code>void</code></li>
\r
814 <td class="msource">StoreMgr</td>
\r
816 <tr class="method-row inherited expandable">
\r
817 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
819 <a id="Ext.StoreMgr-relayEvents"></a>
\r
820 <b>relayEvents</b>( <code>Object o</code>, <code>Array events</code> ) : void <div class="mdesc">
\r
821 <div class="short">Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>.</div>
\r
823 Relays selected events from the specified Observable as if the events were fired by <tt><b>this</b></tt>. <div class="mdetail-params">
\r
824 <strong>Parameters:</strong>
\r
825 <ul><li><code>o</code> : Object<div class="sub-desc">The Observable whose events this object is to relay.</div></li><li><code>events</code> : Array<div class="sub-desc">Array of event names to relay.</div></li> </ul>
\r
826 <strong>Returns:</strong>
\r
828 <li><code>void</code></li>
\r
834 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#relayEvents" href="output/Ext.util.Observable.html#relayEvents">Observable</a></td>
\r
836 <tr class="method-row inherited alt expandable">
\r
837 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
839 <a id="Ext.StoreMgr-remove"></a>
\r
840 <b>remove</b>( <code>Object o</code> ) : Object <div class="mdesc">
\r
841 <div class="short">Remove an item from the collection.</div>
\r
843 Remove an item from the collection. <div class="mdetail-params">
\r
844 <strong>Parameters:</strong>
\r
845 <ul><li><code>o</code> : Object<div class="sub-desc">The item to remove.</div></li> </ul>
\r
846 <strong>Returns:</strong>
\r
848 <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>
\r
854 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#remove" href="output/Ext.util.MixedCollection.html#remove">MixedCollection</a></td>
\r
856 <tr class="method-row inherited expandable">
\r
857 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
859 <a id="Ext.StoreMgr-removeAt"></a>
\r
860 <b>removeAt</b>( <code>Number index</code> ) : Object <div class="mdesc">
\r
861 <div class="short">Remove an item from a specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="remove" href="output/Ext.util.MixedCollection.html#remove">remove</a> event when complete.</div>
\r
863 Remove an item from a specified index in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="remove" href="output/Ext.util.MixedCollection.html#remove">remove</a> event when complete. <div class="mdetail-params">
\r
864 <strong>Parameters:</strong>
\r
865 <ul><li><code>index</code> : Number<div class="sub-desc">The index within the collection of the item to remove.</div></li> </ul>
\r
866 <strong>Returns:</strong>
\r
868 <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>
\r
874 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#removeAt" href="output/Ext.util.MixedCollection.html#removeAt">MixedCollection</a></td>
\r
876 <tr class="method-row inherited alt expandable">
\r
877 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
879 <a id="Ext.StoreMgr-removeKey"></a>
\r
880 <b>removeKey</b>( <code>String key</code> ) : Object <div class="mdesc">
\r
881 <div class="short">Removed an item associated with the passed key fom the collection.</div>
\r
883 Removed an item associated with the passed key fom the collection. <div class="mdetail-params">
\r
884 <strong>Parameters:</strong>
\r
885 <ul><li><code>key</code> : String<div class="sub-desc">The key of the item to remove.</div></li> </ul>
\r
886 <strong>Returns:</strong>
\r
888 <li><code>Object</code><div class="sub-desc">The item removed or false if no item was removed.</div></li>
\r
894 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#removeKey" href="output/Ext.util.MixedCollection.html#removeKey">MixedCollection</a></td>
\r
896 <tr class="method-row inherited expandable">
\r
897 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
899 <a id="Ext.StoreMgr-removeListener"></a>
\r
900 <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">
\r
901 <div class="short">Removes a listener</div>
\r
903 Removes a listener <div class="mdetail-params">
\r
904 <strong>Parameters:</strong>
\r
905 <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>
\r
906 <strong>Returns:</strong>
\r
908 <li><code>void</code></li>
\r
914 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
\r
916 <tr class="method-row inherited alt expandable">
\r
917 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
919 <a id="Ext.StoreMgr-replace"></a>
\r
920 <b>replace</b>( <code>String key</code>, <span class="optional" title="Optional">[<code>o {Object}</code>]</span> ) : Object <div class="mdesc">
\r
921 <div class="short">Replaces an item in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="replace" href="output/Ext.util.MixedCollection.html#replace">replace</a> event when complete.</div>
\r
923 Replaces an item in the collection. Fires the <a ext:cls="Ext.util.MixedCollection" ext:member="replace" href="output/Ext.util.MixedCollection.html#replace">replace</a> event when complete. <div class="mdetail-params">
\r
924 <strong>Parameters:</strong>
\r
925 <ul><li><code>key</code> : String<div class="sub-desc"><p>The key associated with the item to replace, or the replacement item.</p>
926 <p>If you supplied a <a ext:cls="Ext.util.MixedCollection" ext:member="getKey" href="output/Ext.util.MixedCollection.html#getKey">getKey</a> implementation for this MixedCollection, or if the key
927 of your stored items is in a property called <tt><b>id</b></tt>, then the MixedCollection
928 will be able to <i>derive</i> the key of the replacement item. If you want to replace an item
929 with one having the same key value, then just pass the replacement item in this parameter.</p></div></li><li><code>{Object}</code> : o<div class="sub-desc">o (optional) If the first parameter passed was a key, the item to associate
930 with that key.</div></li> </ul>
\r
931 <strong>Returns:</strong>
\r
933 <li><code>Object</code><div class="sub-desc">The new item.</div></li>
\r
939 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#replace" href="output/Ext.util.MixedCollection.html#replace">MixedCollection</a></td>
\r
941 <tr class="method-row inherited expandable">
\r
942 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
944 <a id="Ext.StoreMgr-resumeEvents"></a>
\r
945 <b>resumeEvents</b>() : void <div class="mdesc">
\r
946 <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>
\r
948 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">
\r
949 <strong>Parameters:</strong>
\r
950 <ul><li>None.</li> </ul>
\r
951 <strong>Returns:</strong>
\r
953 <li><code>void</code></li>
\r
959 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
\r
961 <tr class="method-row inherited alt expandable">
\r
962 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
964 <a id="Ext.StoreMgr-sort"></a>
\r
965 <b>sort</b>( <span class="optional" title="Optional">[<code>String direction</code>]</span>, <span class="optional" title="Optional">[<code>Function fn</code>]</span> ) : void <div class="mdesc">
\r
966 <div class="short">Sorts this collection with the passed comparison function</div>
\r
968 Sorts this collection with the passed comparison function <div class="mdetail-params">
\r
969 <strong>Parameters:</strong>
\r
970 <ul><li><code>direction</code> : String<div class="sub-desc">(optional) "ASC" or "DESC"</div></li><li><code>fn</code> : Function<div class="sub-desc">(optional) comparison function</div></li> </ul>
\r
971 <strong>Returns:</strong>
\r
973 <li><code>void</code></li>
\r
979 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#sort" href="output/Ext.util.MixedCollection.html#sort">MixedCollection</a></td>
\r
981 <tr class="method-row inherited expandable">
\r
982 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
984 <a id="Ext.StoreMgr-suspendEvents"></a>
\r
985 <b>suspendEvents</b>() : void <div class="mdesc">
\r
986 <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>
\r
988 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">
\r
989 <strong>Parameters:</strong>
\r
990 <ul><li>None.</li> </ul>
\r
991 <strong>Returns:</strong>
\r
993 <li><code>void</code></li>
\r
999 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
\r
1001 <tr class="method-row inherited alt expandable">
\r
1002 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1004 <a id="Ext.StoreMgr-un"></a>
\r
1005 <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">
\r
1006 <div class="short">Removes a listener (shorthand for removeListener)</div>
\r
1007 <div class="long">
\r
1008 Removes a listener (shorthand for removeListener) <div class="mdetail-params">
\r
1009 <strong>Parameters:</strong>
\r
1010 <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>
\r
1011 <strong>Returns:</strong>
\r
1013 <li><code>void</code></li>
\r
1019 <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
\r
1021 <tr class="method-row expandable">
\r
1022 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1024 <a id="Ext.StoreMgr-unregister"></a>
\r
1025 <b>unregister</b>( <code>String/Object id1</code>, <span class="optional" title="Optional">[<code>String/Object id2</code>]</span>, <span class="optional" title="Optional">[<code>String/Object etc...</code>]</span> ) : void <div class="mdesc">
\r
1026 <div class="short">Unregisters one or more Stores with the StoreMgr</div>
\r
1027 <div class="long">
\r
1028 Unregisters one or more Stores with the StoreMgr <div class="mdetail-params">
\r
1029 <strong>Parameters:</strong>
\r
1030 <ul><li><code>id1</code> : String/Object<div class="sub-desc">The id of the Store, or a Store instance</div></li><li><code>id2</code> : String/Object<div class="sub-desc">(optional)</div></li><li><code>etc...</code> : String/Object<div class="sub-desc">(optional)</div></li> </ul>
\r
1031 <strong>Returns:</strong>
\r
1033 <li><code>void</code></li>
\r
1039 <td class="msource">StoreMgr</td>
\r
1042 <a id="Ext.StoreMgr-events"></a>
1043 <h2>Public Events</h2>
1044 <table cellspacing="0" class="member-table">
1046 <th class="sig-header" colspan="2">Event</th>
1047 <th class="msource-header">Defined By</th>
1049 <tr class="event-row inherited expandable">
\r
1050 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1052 <a id="Ext.StoreMgr-add"></a>
\r
1053 <b>add</b> : ( <code>Number index</code>, <code>Object o</code>, <code>String key</code> ) <div class="mdesc">
\r
1054 <div class="short">Fires when an item is added to the collection.</div>
\r
1055 <div class="long">
\r
1056 Fires when an item is added to the collection. <div class="mdetail-params">
\r
1057 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1058 <ul><li><code>index</code> : Number<div class="sub-desc">The index at which the item was added.</div></li><li><code>o</code> : Object<div class="sub-desc">The item added.</div></li><li><code>key</code> : String<div class="sub-desc">The key associated with the added item.</div></li> </ul>
\r
1063 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#event-add" href="output/Ext.util.MixedCollection.html#event-add">MixedCollection</a></td>
\r
1065 <tr class="event-row inherited alt expandable">
\r
1066 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1068 <a id="Ext.StoreMgr-clear"></a>
\r
1069 <b>clear</b> : () <div class="mdesc">
\r
1070 <div class="short">Fires when the collection is cleared.</div>
\r
1071 <div class="long">
\r
1072 Fires when the collection is cleared. <div class="mdetail-params">
\r
1073 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1074 <ul><li>None.</li> </ul>
\r
1079 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#event-clear" href="output/Ext.util.MixedCollection.html#event-clear">MixedCollection</a></td>
\r
1081 <tr class="event-row inherited expandable">
\r
1082 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1084 <a id="Ext.StoreMgr-remove"></a>
\r
1085 <b>remove</b> : ( <code>Object o</code>, <span class="optional" title="Optional">[<code>String key</code>]</span> ) <div class="mdesc">
\r
1086 <div class="short">Fires when an item is removed from the collection.</div>
\r
1087 <div class="long">
\r
1088 Fires when an item is removed from the collection. <div class="mdetail-params">
\r
1089 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1090 <ul><li><code>o</code> : Object<div class="sub-desc">The item being removed.</div></li><li><code>key</code> : String<div class="sub-desc">(optional) The key associated with the removed item.</div></li> </ul>
\r
1095 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#event-remove" href="output/Ext.util.MixedCollection.html#event-remove">MixedCollection</a></td>
\r
1097 <tr class="event-row inherited alt expandable">
\r
1098 <td class="micon"><a class="exi" href="#expand"> </a></td>
\r
1100 <a id="Ext.StoreMgr-replace"></a>
\r
1101 <b>replace</b> : ( <code>String key</code>, <code>Object old</code>, <code>Object new</code> ) <div class="mdesc">
\r
1102 <div class="short">Fires when an item is replaced in the collection.</div>
\r
1103 <div class="long">
\r
1104 Fires when an item is replaced in the collection. <div class="mdetail-params">
\r
1105 <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
\r
1106 <ul><li><code>key</code> : String<div class="sub-desc">he key associated with the new added.</div></li><li><code>old</code> : Object<div class="sub-desc">The item being replaced.</div></li><li><code>new</code> : Object<div class="sub-desc">The new item.</div></li> </ul>
\r
1111 <td class="msource"><a ext:cls="Ext.util.MixedCollection" ext:member="#event-replace" href="output/Ext.util.MixedCollection.html#event-replace">MixedCollection</a></td>
\r