1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.data.Store</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.data.Store-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.data.Store-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.data.Store-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.data.Store-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <div class="inheritance res-block">
46 <pre class="res-block-inner"><a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
47 <img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.data.Store
52 <!-- ============================== class title / details ============================ -->
55 <h1 class="classTitle">
60 <table cellspacing="0" class="class-summary-table">
62 <tr><td class="label">Package:</td><td class="hd-info">Roo.data</td></tr>
64 <tr><td class="label">Defined In:</td><td class="hd-info">
66 <a href="./src/Roo_data_Store.js.html">Roo/data/Store.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">Store</td></tr>
72 <tr><td class="label">Subclasses:</td><td class="hd-info">
73 <a href="./Roo.data.JsonStore.html#constructor" roo:cls="Roo.data.JsonStore.html#constructor">Roo.data.JsonStore</a>, <a href="./Roo.data.SimpleStore.html#constructor" roo:cls="Roo.data.SimpleStore.html#constructor">Roo.data.SimpleStore</a>
81 <tr><td class="label">Extends:</td><td class="hd-info">
82 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
90 <!-- ============================== class summary ========================== -->
91 <div class="description">
92 The Store class encapsulates a client side cache of {<b>link</b> Roo.data.Record} objects which provide input data<br/>for widgets such as the Roo.grid.Grid, or the Roo.form.ComboBox.<br><br/><p><br/>A Store object uses an implementation of {<b>link</b> Roo.data.DataProxy} to access a data object unless you call loadData() directly and pass in your data. The Store object<br/>has no knowledge of the format of the data returned by the Proxy.<br><br/><p><br/>A Store object uses its configured implementation of {<b>link</b> Roo.data.DataReader} to create {<b>link</b> Roo.data.Record}<br/>instances from the data object. These records are cached and made available through accessor functions.
96 <!-- ============================== Class comment block... ========================== -->
98 <div class="comments">
99 <b>Class Comments / Notes</B> =>
100 <u onclick="parent.CommentDialog.showCommentId = 'Roo.data.Store';">[Add Your comment/notes about this class]</u>
102 <iframe frameborder="0" id="comments-Roo.data" style="border: none;width:100%;"
103 src="/blog.php/GtkDjsComments/Roo.data.Store.html"></iframe>
108 <!-- ============================== config options ========================== -->
113 <div class="hr"></div>
114 <a id="Roo.data.Store-configs"></a>
120 <table cellspacing="0" class="member-table">
121 <caption>Config Options (Usually are also Properties)</caption>
125 <th class="sig-header" colspan="2">Options</th>
127 <th class="msource-header">Defined By</th>
134 <tr class="config-row expandable config-row-alt0 notInherited">
135 <td class="micon"><a class="exi" href="#expand"> </a></td>
138 <a id="Roo.data.Store-cfg-baseParams" name=".baseParams"></a>
139 <div class="fixedFont">
140 <b class="itemname">baseParams</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
146 <div class="short">An object containing properties which are to be sent as parameters<br/>on any HTTP request</div>
150 <div class="long">An object containing properties which are to be sent as parameters<br/>on any HTTP request</div>
164 <tr class="config-row expandable config-row-alt1 notInherited">
165 <td class="micon"><a class="exi" href="#expand"> </a></td>
168 <a id="Roo.data.Store-cfg-data" name=".data"></a>
169 <div class="fixedFont">
170 <b class="itemname">data</b> : <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
176 <div class="short">Inline data to be loaded when the store is initialized.</div>
180 <div class="long">Inline data to be loaded when the store is initialized.</div>
194 <tr class="config-row expandable config-row-alt0 notInherited">
195 <td class="micon"><a class="exi" href="#expand"> </a></td>
198 <a id="Roo.data.Store-cfg-isLocal" name=".isLocal"></a>
199 <div class="fixedFont">
200 <b class="itemname">isLocal</b> : boolean
206 <div class="short">flag if data is locally available (and can be always looked up<br/>without a remote query - used by combo/forms at present.</div>
210 <div class="long">flag if data is locally available (and can be always looked up<br/>without a remote query - used by combo/forms at present.</div>
224 <tr class="config-row expandable config-row-alt1">
225 <td class="micon"><a class="exi" href="#expand"> </a></td>
228 <a id="Roo.util.Observable-cfg-listeners" name=".listeners"></a>
229 <div class="fixedFont">
230 <b class="itemname">listeners</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
236 <div class="short">list of events and functions to call for this object, <br/>For example :<br/><pre><code><br/> listeners : { <br/> 'click' : function(e) {<br/> .</div>
240 <div class="long">list of events and functions to call for this object, <br/>For example :<br/><pre><code><br/> listeners : { <br/> 'click' : function(e) {<br/> ..... <br/> } ,<br/> .... <br/> } <br/> </code></pre></div>
248 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
254 <tr class="config-row expandable config-row-alt0 notInherited">
255 <td class="micon"><a class="exi" href="#expand"> </a></td>
258 <a id="Roo.data.Store-cfg-multiSort" name=".multiSort"></a>
259 <div class="fixedFont">
260 <b class="itemname">multiSort</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
266 <div class="short">enable multi column sorting (sort is based on the order of columns, remote only at present)</div>
270 <div class="long">enable multi column sorting (sort is based on the order of columns, remote only at present)</div>
284 <tr class="config-row expandable config-row-alt1 notInherited">
285 <td class="micon"><a class="exi" href="#expand"> </a></td>
288 <a id="Roo.data.Store-cfg-proxy" name=".proxy"></a>
289 <div class="fixedFont">
290 <b class="itemname">proxy</b> : <a href="./Roo.data.DataProxy.html#constructor" roo:cls="Roo.data.DataProxy.html#constructor">Roo.data.DataProxy</a>
296 <div class="short">The Proxy object which provides access to a data object.</div>
300 <div class="long">The Proxy object which provides access to a data object.</div>
314 <tr class="config-row expandable config-row-alt0 notInherited">
315 <td class="micon"><a class="exi" href="#expand"> </a></td>
318 <a id="Roo.data.Store-cfg-pruneModifiedRecords" name=".pruneModifiedRecords"></a>
319 <div class="fixedFont">
320 <b class="itemname">pruneModifiedRecords</b> : boolean
326 <div class="short">True to clear all modified record information each time the store is<br/>loaded or when a record is removed.</div>
330 <div class="long">True to clear all modified record information each time the store is<br/>loaded or when a record is removed. (defaults to false).</div>
344 <tr class="config-row expandable config-row-alt1 notInherited">
345 <td class="micon"><a class="exi" href="#expand"> </a></td>
348 <a id="Roo.data.Store-cfg-reader" name=".reader"></a>
349 <div class="fixedFont">
350 <b class="itemname">reader</b> : Roo.data.Reader
356 <div class="short">The Reader object which processes the data object and returns<br/>an Array of Roo.data.record objects which are cached keyed by their <em>id</em> property.</div>
360 <div class="long">The Reader object which processes the data object and returns<br/>an Array of Roo.data.record objects which are cached keyed by their <em>id</em> property.</div>
374 <tr class="config-row expandable config-row-alt0 notInherited">
375 <td class="micon"><a class="exi" href="#expand"> </a></td>
378 <a id="Roo.data.Store-cfg-remoteSort" name=".remoteSort"></a>
379 <div class="fixedFont">
380 <b class="itemname">remoteSort</b> : boolean
386 <div class="short">True if sorting is to be handled by requesting the Proxy to provide a refreshed<br/>version of the data object in sorted order, as opposed to sorting the Record cache in place (defaults to false).</div>
390 <div class="long">True if sorting is to be handled by requesting the Proxy to provide a refreshed<br/>version of the data object in sorted order, as opposed to sorting the Record cache in place (defaults to false).</div>
404 <tr class="config-row expandable config-row-alt1 notInherited">
405 <td class="micon"><a class="exi" href="#expand"> </a></td>
408 <a id="Roo.data.Store-cfg-sortInfo" name=".sortInfo"></a>
409 <div class="fixedFont">
410 <b class="itemname">sortInfo</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
416 <div class="short">A config object in the format: {field: "fieldName", direction: "ASC|DESC"}</div>
420 <div class="long">A config object in the format: {field: "fieldName", direction: "ASC|DESC"}</div>
444 <!-- ============================== public properties ==================== -->
448 <a id="Roo.data.Store-props"></a>
454 <table cellspacing="0" class="member-table">
455 <caption class="Empty">Public Properties - Has None</caption>
461 <!-- ============================== methods summary / details ======================== -->
464 <a id="Roo.data.Store-methods"></a>
465 <!-- constructor?? -->
472 <!-- then dynamics first -->
479 <table cellspacing="0" class="member-table">
480 <caption>Public Methods</caption>
482 <th class="sig-header" colspan="2">Method</th>
483 <th class="msource-header">Defined By</th>
493 <tr class="method-row config-row-alt0 expandable notInherited">
494 <td class="micon"><a class="exi" href="#expand"> </a></td>
498 <a id="Roo.data-method-Store" name=".Store"></a>
499 <div class="fixedFont">
500 <span class="attributes">new <B>Roo.data.</B></span><b class="itemname">Store</b>
502 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
510 <div class="short">Create a new Roo.data.Store</div>
517 Create a new Roo.data.Store
520 <dl class="detailList">
521 <dt class="heading">Parameters:</dt>
524 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>config</b>
527 <dd>A config object containing the objects needed for the Store to access data,<br/>and read the data into Records.</dd>
551 <tr class="method-row config-row-alt1 expandable notInherited">
552 <td class="micon"><a class="exi" href="#expand"> </a></td>
556 <a id="Roo.data.Store-method-add" name=".add"></a>
557 <div class="fixedFont">
558 <span class="attributes"></span><b class="itemname">add</b>
560 (<a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[] <B><i>records</i></B>)
567 <div class="short">Add Records to the Store and fires the add event.</div>
573 Add Records to the Store and fires the add event.
580 <dl class="detailList">
581 <dt class="heading">Parameters:</dt>
584 <span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]</span> <b>records</b>
587 <dd>An Array of Roo.data.Record objects to add to the cache.</dd>
613 <tr class="method-row config-row-alt0 expandable">
614 <td class="micon"><a class="exi" href="#expand"> </a></td>
618 <a id="Roo.util.Observable-method-addEvents" name=".addEvents"></a>
619 <div class="fixedFont">
620 <span class="attributes"></span><b class="itemname">addEvents</b>
622 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>object</i></B>)
629 <div class="short">Used to define events on this Observable</div>
635 Used to define events on this Observable
642 <dl class="detailList">
643 <dt class="heading">Parameters:</dt>
646 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>object</b>
649 <dd>The object with the events defined</dd>
669 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
675 <tr class="method-row config-row-alt1 expandable">
676 <td class="micon"><a class="exi" href="#expand"> </a></td>
680 <a id="Roo.util.Observable-method-addListener" name=".addListener"></a>
681 <div class="fixedFont">
682 <span class="attributes"></span><b class="itemname">addListener</b>
684 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
691 <div class="short">Appends an event handler to this component</div>
697 Appends an event handler to this component
704 <dl class="detailList">
705 <dt class="heading">Parameters:</dt>
708 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
711 <dd>The type of event to listen for</dd>
714 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
717 <dd>The method the event invokes</dd>
720 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
723 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
726 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
729 <dd>(optional) An object containing handler configuration<br/>properties. This may contain any of the following properties:<ul><br/><li>scope {Object} The scope in which to execute the handler function. The handler function's "this" context.</li><br/><li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li><br/><li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li><br/><li>buffer {Number} Causes the handler to be scheduled to run in an {<b>link</b> Roo.util.DelayedTask} delayed<br/>by the specified number of milliseconds. If the event fires again within that time, the original<br/>handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li><br/></ul><br><br/><p><br/><b>Combining Options</b><br><br/>Using the options argument, it is possible to combine different types of listeners:<br><br/><br><br/>A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<br/> <pre><code><br/> el.on('click', this.onClick, this, {<br/> single: true,<br/> delay: 100,<br/> forumId: 4<br/> });<br/> </code></pre><br/><p><br/><b>Attaching multiple handlers in 1 call</b><br><br/>The method also allows for a single argument to be passed which is a config object containing properties<br/>which specify multiple handlers.<br/><pre><code><br/> el.on({<br/> 'click': {<br/> fn: this.onClick,<br/> scope: this,<br/> delay: 100<br/> }, <br/> 'mouseover': {<br/> fn: this.onMouseOver,<br/> scope: this<br/> },<br/> 'mouseout': {<br/> fn: this.onMouseOut,<br/> scope: this<br/> }<br/> });<br/> </code></pre><br/><p><br/>Or a shorthand syntax which passes the same scope object to all handlers:<br/> <pre><code><br/> el.on({<br/> 'click': this.onClick,<br/> 'mouseover': this.onMouseOver,<br/> 'mouseout': this.onMouseOut,<br/> scope: this<br/> });<br/> </code></pre></dd>
749 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
755 <tr class="method-row config-row-alt0 expandable notInherited">
756 <td class="micon"><a class="exi" href="#expand"> </a></td>
760 <a id="Roo.data.Store-method-clearFilter" name=".clearFilter"></a>
761 <div class="fixedFont">
762 <span class="attributes"></span><b class="itemname">clearFilter</b>
764 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>suppressEvent</i></B>)
771 <div class="short">Revert to a view of the Record cache with no filtering applied.</div>
777 Revert to a view of the Record cache with no filtering applied.
784 <dl class="detailList">
785 <dt class="heading">Parameters:</dt>
788 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>suppressEvent</b>
791 <dd>If true the filter is cleared silently without notifying listeners</dd>
817 <tr class="method-row config-row-alt1 expandable notInherited">
818 <td class="micon"><a class="exi" href="#expand"> </a></td>
822 <a id="Roo.data.Store-method-collect" name=".collect"></a>
823 <div class="fixedFont">
824 <span class="attributes"></span><b class="itemname">collect</b>
826 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>dataIndex</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>allowNull</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>bypassFilter</i></B>)
832 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
841 <div class="short">Collects unique values for a particular dataIndex from this store.</div>
847 Collects unique values for a particular dataIndex from this store.
854 <dl class="detailList">
855 <dt class="heading">Parameters:</dt>
858 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dataIndex</b>
861 <dd>The property to collect</dd>
864 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>allowNull</b>
867 <dd>(optional) Pass true to allow null, undefined or empty string values</dd>
870 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>bypassFilter</b>
873 <dd>(optional) Pass true to collect from all records, even ones which are filtered</dd>
881 <dl class="detailList">
882 <dt class="heading">Returns:</dt>
884 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> An array of the unique values</dd>
906 <tr class="method-row config-row-alt0 expandable notInherited">
907 <td class="micon"><a class="exi" href="#expand"> </a></td>
911 <a id="Roo.data.Store-method-commitChanges" name=".commitChanges"></a>
912 <div class="fixedFont">
913 <span class="attributes"></span><b class="itemname">commitChanges</b>
922 <div class="short">Commit all Records with outstanding changes.</div>
928 Commit all Records with outstanding changes. To handle updates for changes, subscribe to the<br/>Store's "update" event, and perform updating when the third parameter is Roo.data.Record.COMMIT.
957 <tr class="method-row config-row-alt1 expandable notInherited">
958 <td class="micon"><a class="exi" href="#expand"> </a></td>
962 <a id="Roo.data.Store-method-each" name=".each"></a>
963 <div class="fixedFont">
964 <span class="attributes"></span><b class="itemname">each</b>
966 (<a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>fn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
973 <div class="short">Calls the specified function for each of the Records in the cache.</div>
979 Calls the specified function for each of the Records in the cache.
986 <dl class="detailList">
987 <dt class="heading">Parameters:</dt>
990 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
993 <dd>The function to call. The Record is passed as the first parameter.<br/>Returning <em>false</em> aborts and exits the iteration.</dd>
996 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
999 <dd>(optional) The scope in which to call the function (defaults to the Record).</dd>
1017 <td class="msource">
1025 <tr class="method-row config-row-alt0 expandable notInherited">
1026 <td class="micon"><a class="exi" href="#expand"> </a></td>
1030 <a id="Roo.data.Store-method-filter" name=".filter"></a>
1031 <div class="fixedFont">
1032 <span class="attributes"></span><b class="itemname">filter</b>
1034 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>field</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp <B><i>value</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>anyMatch</i></B>)
1041 <div class="short">Filter the records by a specified property.</div>
1047 Filter the records by a specified property.
1054 <dl class="detailList">
1055 <dt class="heading">Parameters:</dt>
1058 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>field</b>
1061 <dd>A field on your records</dd>
1064 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp</span> <b>value</b>
1067 <dd>Either a string that the field<br/>should start with or a RegExp to test against the field</dd>
1070 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>anyMatch</b>
1073 <dd>True to match any part not just the beginning</dd>
1091 <td class="msource">
1099 <tr class="method-row config-row-alt1 expandable notInherited">
1100 <td class="micon"><a class="exi" href="#expand"> </a></td>
1104 <a id="Roo.data.Store-method-filterBy" name=".filterBy"></a>
1105 <div class="fixedFont">
1106 <span class="attributes"></span><b class="itemname">filterBy</b>
1108 (<a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>fn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
1115 <div class="short">Filter by a function.</div>
1121 Filter by a function. The specified function will be called with each<br/>record in this data source. If the function returns true the record is included,<br/>otherwise it is filtered.
1128 <dl class="detailList">
1129 <dt class="heading">Parameters:</dt>
1132 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
1135 <dd>The function to be called, it will receive 2 args (record, id)</dd>
1138 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1141 <dd>(optional) The scope of the function (defaults to this)</dd>
1159 <td class="msource">
1167 <tr class="method-row config-row-alt0 expandable">
1168 <td class="micon"><a class="exi" href="#expand"> </a></td>
1172 <a id="Roo.util.Observable-method-fireEvent" name=".fireEvent"></a>
1173 <div class="fixedFont">
1174 <span class="attributes"></span><b class="itemname">fireEvent</b>
1176 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object...</a> <B><i>args</i></B>)
1182 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1191 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
1197 Fires the specified event with the passed parameters (minus the event name).
1204 <dl class="detailList">
1205 <dt class="heading">Parameters:</dt>
1208 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1214 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object...</a></span> <b>args</b>
1217 <dd>Variable number of parameters are passed to handlers</dd>
1225 <dl class="detailList">
1226 <dt class="heading">Returns:</dt>
1228 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> returns false if any of the handlers return false otherwise it returns true</dd>
1242 <td class="msource">
1244 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1250 <tr class="method-row config-row-alt1 expandable notInherited">
1251 <td class="micon"><a class="exi" href="#expand"> </a></td>
1255 <a id="Roo.data.Store-method-getAt" name=".getAt"></a>
1256 <div class="fixedFont">
1257 <span class="attributes"></span><b class="itemname">getAt</b>
1259 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
1265 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>
1274 <div class="short">Get the Record at the specified index.</div>
1280 Get the Record at the specified index.
1287 <dl class="detailList">
1288 <dt class="heading">Parameters:</dt>
1291 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1294 <dd>The index of the Record to find.</dd>
1302 <dl class="detailList">
1303 <dt class="heading">Returns:</dt>
1305 <dd><span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a></span> The Record at the passed index. Returns undefined if not found.</dd>
1319 <td class="msource">
1327 <tr class="method-row config-row-alt0 expandable notInherited">
1328 <td class="micon"><a class="exi" href="#expand"> </a></td>
1332 <a id="Roo.data.Store-method-getById" name=".getById"></a>
1333 <div class="fixedFont">
1334 <span class="attributes"></span><b class="itemname">getById</b>
1336 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
1342 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>
1351 <div class="short">Get the Record with the specified id.</div>
1357 Get the Record with the specified id.
1364 <dl class="detailList">
1365 <dt class="heading">Parameters:</dt>
1368 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
1371 <dd>The id of the Record to find.</dd>
1379 <dl class="detailList">
1380 <dt class="heading">Returns:</dt>
1382 <dd><span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a></span> The Record with the passed id. Returns undefined if not found.</dd>
1396 <td class="msource">
1404 <tr class="method-row config-row-alt1 expandable notInherited">
1405 <td class="micon"><a class="exi" href="#expand"> </a></td>
1409 <a id="Roo.data.Store-method-getCount" name=".getCount"></a>
1410 <div class="fixedFont">
1411 <span class="attributes"></span><b class="itemname">getCount</b>
1420 <div class="short">Gets the number of cached records.</div>
1426 Gets the number of cached records.<br/><p><br/><em>If using paging, this may not be the total size of the dataset. If the data object<br/>used by the Reader contains the dataset size, then the getTotalCount() function returns<br/>the data set size</em>
1447 <td class="msource">
1455 <tr class="method-row config-row-alt0 expandable notInherited">
1456 <td class="micon"><a class="exi" href="#expand"> </a></td>
1460 <a id="Roo.data.Store-method-getModifiedRecords" name=".getModifiedRecords"></a>
1461 <div class="fixedFont">
1462 <span class="attributes"></span><b class="itemname">getModifiedRecords</b>
1470 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]
1479 <div class="short">Gets all records modified since the last commit.</div>
1485 Gets all records modified since the last commit. Modified records are persisted across load operations<br/>(e.g., during paging).
1496 <dl class="detailList">
1497 <dt class="heading">Returns:</dt>
1499 <dd><span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]</span> An array of Records containing outstanding modifications.</dd>
1513 <td class="msource">
1521 <tr class="method-row config-row-alt1 expandable notInherited">
1522 <td class="micon"><a class="exi" href="#expand"> </a></td>
1526 <a id="Roo.data.Store-method-getRange" name=".getRange"></a>
1527 <div class="fixedFont">
1528 <span class="attributes"></span><b class="itemname">getRange</b>
1530 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>startIndex</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>endIndex</i></B>)
1536 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]
1545 <div class="short">Returns a range of Records between specified indices.</div>
1551 Returns a range of Records between specified indices.
1558 <dl class="detailList">
1559 <dt class="heading">Parameters:</dt>
1562 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>startIndex</b>
1565 <dd>(optional) The starting index (defaults to 0)</dd>
1568 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>endIndex</b>
1571 <dd>(optional) The ending index (defaults to the last Record in the Store)</dd>
1579 <dl class="detailList">
1580 <dt class="heading">Returns:</dt>
1582 <dd><span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]</span> An array of Records</dd>
1596 <td class="msource">
1604 <tr class="method-row config-row-alt0 expandable notInherited">
1605 <td class="micon"><a class="exi" href="#expand"> </a></td>
1609 <a id="Roo.data.Store-method-getSortState" name=".getSortState"></a>
1610 <div class="fixedFont">
1611 <span class="attributes"></span><b class="itemname">getSortState</b>
1620 <div class="short">Returns the sort state of the Store as an object with two properties:<br/><pre><code><br/> field {String} The name of the field by which the Records are sorted<br/> direction {String} The sort order, "ASC" or "DESC"<br/></code></pre></div>
1626 Returns the sort state of the Store as an object with two properties:<br/><pre><code><br/> field {String} The name of the field by which the Records are sorted<br/> direction {String} The sort order, "ASC" or "DESC"<br/></code></pre>
1647 <td class="msource">
1655 <tr class="method-row config-row-alt1 expandable notInherited">
1656 <td class="micon"><a class="exi" href="#expand"> </a></td>
1660 <a id="Roo.data.Store-method-getTotalCount" name=".getTotalCount"></a>
1661 <div class="fixedFont">
1662 <span class="attributes"></span><b class="itemname">getTotalCount</b>
1671 <div class="short">Gets the total number of records in the dataset as returned by the server.</div>
1677 Gets the total number of records in the dataset as returned by the server.<br/><p><br/><em>If using paging, for this to be accurate, the data object used by the Reader must contain<br/>the dataset size</em>
1698 <td class="msource">
1706 <tr class="method-row config-row-alt0 expandable">
1707 <td class="micon"><a class="exi" href="#expand"> </a></td>
1711 <a id="Roo.util.Observable-method-hasListener" name=".hasListener"></a>
1712 <div class="fixedFont">
1713 <span class="attributes"></span><b class="itemname">hasListener</b>
1715 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>)
1721 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1730 <div class="short">Checks to see if this object has any listeners for a specified event</div>
1736 Checks to see if this object has any listeners for a specified event
1743 <dl class="detailList">
1744 <dt class="heading">Parameters:</dt>
1747 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1750 <dd>The name of the event to check for</dd>
1758 <dl class="detailList">
1759 <dt class="heading">Returns:</dt>
1761 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> True if the event is being listened for, else false</dd>
1775 <td class="msource">
1777 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1783 <tr class="method-row config-row-alt1 expandable notInherited">
1784 <td class="micon"><a class="exi" href="#expand"> </a></td>
1788 <a id="Roo.data.Store-method-indexOf" name=".indexOf"></a>
1789 <div class="fixedFont">
1790 <span class="attributes"></span><b class="itemname">indexOf</b>
1792 (<a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a> <B><i>record</i></B>)
1798 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1807 <div class="short">Get the index within the cache of the passed Record.</div>
1813 Get the index within the cache of the passed Record.
1820 <dl class="detailList">
1821 <dt class="heading">Parameters:</dt>
1824 <span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a></span> <b>record</b>
1827 <dd>The Roo.data.Record object to to find.</dd>
1835 <dl class="detailList">
1836 <dt class="heading">Returns:</dt>
1838 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The index of the passed Record. Returns -1 if not found.</dd>
1852 <td class="msource">
1860 <tr class="method-row config-row-alt0 expandable notInherited">
1861 <td class="micon"><a class="exi" href="#expand"> </a></td>
1865 <a id="Roo.data.Store-method-indexOfId" name=".indexOfId"></a>
1866 <div class="fixedFont">
1867 <span class="attributes"></span><b class="itemname">indexOfId</b>
1869 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
1875 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1884 <div class="short">Get the index within the cache of the Record with the passed id.</div>
1890 Get the index within the cache of the Record with the passed id.
1897 <dl class="detailList">
1898 <dt class="heading">Parameters:</dt>
1901 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
1904 <dd>The id of the Record to find.</dd>
1912 <dl class="detailList">
1913 <dt class="heading">Returns:</dt>
1915 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The index of the Record. Returns -1 if not found.</dd>
1929 <td class="msource">
1937 <tr class="method-row config-row-alt1 expandable notInherited">
1938 <td class="micon"><a class="exi" href="#expand"> </a></td>
1942 <a id="Roo.data.Store-method-insert" name=".insert"></a>
1943 <div class="fixedFont">
1944 <span class="attributes"></span><b class="itemname">insert</b>
1946 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>, <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[] <B><i>records</i></B>)
1953 <div class="short">Inserts Records to the Store at the given index and fires the add event.</div>
1959 Inserts Records to the Store at the given index and fires the add event.
1966 <dl class="detailList">
1967 <dt class="heading">Parameters:</dt>
1970 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1973 <dd>The start index at which to insert the passed Records.</dd>
1976 <span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]</span> <b>records</b>
1979 <dd>An Array of Roo.data.Record objects to add to the cache.</dd>
1997 <td class="msource">
2005 <tr class="method-row config-row-alt0 expandable notInherited">
2006 <td class="micon"><a class="exi" href="#expand"> </a></td>
2010 <a id="Roo.data.Store-method-load" name=".load"></a>
2011 <div class="fixedFont">
2012 <span class="attributes"></span><b class="itemname">load</b>
2014 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
2021 <div class="short">Loads the Record cache from the configured Proxy using the configured Reader.</div>
2027 Loads the Record cache from the configured Proxy using the configured Reader.<br/><p><br/>If using remote paging, then the first load call must specify the <em>start</em><br/>and <em>limit</em> properties in the options.params property to establish the initial<br/>position within the dataset, and the number of Records to cache on each read from the Proxy.<br/><p><br/><strong>It is important to note that for remote data sources, loading is asynchronous,<br/>and this call will return before the new data has been loaded. Perform any post-processing<br/>in a callback function, or in a "load" event handler.</strong><br/><p>
2034 <dl class="detailList">
2035 <dt class="heading">Parameters:</dt>
2038 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
2041 <dd>An object containing properties which control loading options:<ul><br/><li>params {Object} An object containing properties to pass as HTTP parameters to a remote data source.</li><br/><li>callback {Function} A function to be called after the Records have been loaded. The callback is<br/>passed the following arguments:<ul><br/><li>r : Roo.data.Record[]</li><br/><li>options: Options object from the load call</li><br/><li>success: Boolean success indicator</li></ul></li><br/><li>scope {Object} Scope with which to call the callback (defaults to the Store object)</li><br/><li>add {Boolean} indicator to append loaded records rather than replace the current cache.</li><br/></ul></dd>
2059 <td class="msource">
2067 <tr class="method-row config-row-alt1 expandable notInherited">
2068 <td class="micon"><a class="exi" href="#expand"> </a></td>
2072 <a id="Roo.data.Store-method-loadData" name=".loadData"></a>
2073 <div class="fixedFont">
2074 <span class="attributes"></span><b class="itemname">loadData</b>
2076 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>data</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>append</i></B>)
2083 <div class="short">Loads data from a passed data block.</div>
2089 Loads data from a passed data block. A Reader which understands the format of the data<br/>must have been configured in the constructor.
2096 <dl class="detailList">
2097 <dt class="heading">Parameters:</dt>
2100 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>data</b>
2103 <dd>The data block from which to read the Records. The format of the data expected<br/>is dependent on the type of Reader that is configured and should correspond to that Reader's readRecords parameter.</dd>
2106 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>append</b>
2109 <dd>(Optional) True to append the new Records rather than replace the existing cache.</dd>
2127 <td class="msource">
2135 <tr class="method-row config-row-alt0 expandable">
2136 <td class="micon"><a class="exi" href="#expand"> </a></td>
2140 <a id="Roo.util.Observable-method-on" name=".on"></a>
2141 <div class="fixedFont">
2142 <span class="attributes"></span><b class="itemname">on</b>
2144 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
2151 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
2157 Appends an event handler to this element (shorthand for addListener)
2164 <dl class="detailList">
2165 <dt class="heading">Parameters:</dt>
2168 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
2171 <dd>The type of event to listen for</dd>
2174 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
2177 <dd>The method the event invokes</dd>
2180 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
2183 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
2186 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
2207 <td class="msource">
2209 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2215 <tr class="method-row config-row-alt1 expandable">
2216 <td class="micon"><a class="exi" href="#expand"> </a></td>
2220 <a id="Roo.util.Observable-method-purgeListeners" name=".purgeListeners"></a>
2221 <div class="fixedFont">
2222 <span class="attributes"></span><b class="itemname">purgeListeners</b>
2231 <div class="short">Removes all listeners for this object</div>
2237 Removes all listeners for this object
2258 <td class="msource">
2260 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2266 <tr class="method-row config-row-alt0 expandable notInherited">
2267 <td class="micon"><a class="exi" href="#expand"> </a></td>
2271 <a id="Roo.data.Store-method-query" name=".query"></a>
2272 <div class="fixedFont">
2273 <span class="attributes"></span><b class="itemname">query</b>
2275 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>field</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp <B><i>value</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>anyMatch</i></B>)
2290 <div class="short">Query the records by a specified property.</div>
2296 Query the records by a specified property.
2303 <dl class="detailList">
2304 <dt class="heading">Parameters:</dt>
2307 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>field</b>
2310 <dd>A field on your records</dd>
2313 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp</span> <b>value</b>
2316 <dd>Either a string that the field<br/>should start with or a RegExp to test against the field</dd>
2319 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>anyMatch</b>
2322 <dd>True to match any part not just the beginning</dd>
2330 <dl class="detailList">
2331 <dt class="heading">Returns:</dt>
2333 <dd><span class="fixedFont">MixedCollection</span> Returns an Roo.util.MixedCollection of the matched records</dd>
2347 <td class="msource">
2355 <tr class="method-row config-row-alt1 expandable notInherited">
2356 <td class="micon"><a class="exi" href="#expand"> </a></td>
2360 <a id="Roo.data.Store-method-queryBy" name=".queryBy"></a>
2361 <div class="fixedFont">
2362 <span class="attributes"></span><b class="itemname">queryBy</b>
2364 (<a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>fn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
2379 <div class="short">Query by a function.</div>
2385 Query by a function. The specified function will be called with each<br/>record in this data source. If the function returns true the record is included<br/>in the results.
2392 <dl class="detailList">
2393 <dt class="heading">Parameters:</dt>
2396 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
2399 <dd>The function to be called, it will receive 2 args (record, id)</dd>
2402 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
2405 <dd>(optional) The scope of the function (defaults to this)</dd>
2413 <dl class="detailList">
2414 <dt class="heading">Returns:</dt>
2416 <dd><span class="fixedFont">MixedCollection</span> Returns an Roo.util.MixedCollection of the matched records</dd>
2430 <td class="msource">
2438 <tr class="method-row config-row-alt0 expandable notInherited">
2439 <td class="micon"><a class="exi" href="#expand"> </a></td>
2443 <a id="Roo.data.Store-method-rejectChanges" name=".rejectChanges"></a>
2444 <div class="fixedFont">
2445 <span class="attributes"></span><b class="itemname">rejectChanges</b>
2454 <div class="short">Cancel outstanding changes on all changed records.</div>
2460 Cancel outstanding changes on all changed records.
2481 <td class="msource">
2489 <tr class="method-row config-row-alt1 expandable notInherited">
2490 <td class="micon"><a class="exi" href="#expand"> </a></td>
2494 <a id="Roo.data.Store-method-reload" name=".reload"></a>
2495 <div class="fixedFont">
2496 <span class="attributes"></span><b class="itemname">reload</b>
2498 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
2505 <div class="short">Reloads the Record cache from the configured Proxy using the configured Reader and<br/>the options from the last load operation performed.</div>
2511 Reloads the Record cache from the configured Proxy using the configured Reader and<br/>the options from the last load operation performed.
2518 <dl class="detailList">
2519 <dt class="heading">Parameters:</dt>
2522 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
2525 <dd>(optional) An object containing properties which may override the options<br/>used in the last load operation. See {<b>link</b> <b>load</b>} for details (defaults to null, in which case<br/>the most recently used options are reused).</dd>
2543 <td class="msource">
2551 <tr class="method-row config-row-alt0 expandable notInherited">
2552 <td class="micon"><a class="exi" href="#expand"> </a></td>
2556 <a id="Roo.data.Store-method-remove" name=".remove"></a>
2557 <div class="fixedFont">
2558 <span class="attributes"></span><b class="itemname">remove</b>
2560 (Ext.data.Record <B><i>record</i></B>)
2567 <div class="short">Remove a Record from the Store and fires the remove event.</div>
2573 Remove a Record from the Store and fires the remove event.
2580 <dl class="detailList">
2581 <dt class="heading">Parameters:</dt>
2584 <span class="fixedFont">Ext.data.Record</span> <b>record</b>
2587 <dd>The Roo.data.Record object to remove from the cache.</dd>
2605 <td class="msource">
2613 <tr class="method-row config-row-alt1 expandable notInherited">
2614 <td class="micon"><a class="exi" href="#expand"> </a></td>
2618 <a id="Roo.data.Store-method-removeAll" name=".removeAll"></a>
2619 <div class="fixedFont">
2620 <span class="attributes"></span><b class="itemname">removeAll</b>
2629 <div class="short">Remove all Records from the Store and fires the clear event.</div>
2635 Remove all Records from the Store and fires the clear event.
2656 <td class="msource">
2664 <tr class="method-row config-row-alt0 expandable">
2665 <td class="micon"><a class="exi" href="#expand"> </a></td>
2669 <a id="Roo.util.Observable-method-removeListener" name=".removeListener"></a>
2670 <div class="fixedFont">
2671 <span class="attributes"></span><b class="itemname">removeListener</b>
2673 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
2680 <div class="short">Removes a listener</div>
2693 <dl class="detailList">
2694 <dt class="heading">Parameters:</dt>
2697 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
2700 <dd>The type of event to listen for</dd>
2703 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
2706 <dd>The handler to remove</dd>
2709 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
2712 <dd>(optional) The scope (this object) for the handler</dd>
2730 <td class="msource">
2732 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2738 <tr class="method-row config-row-alt1 expandable notInherited">
2739 <td class="micon"><a class="exi" href="#expand"> </a></td>
2743 <a id="Roo.data.Store-method-setDefaultSort" name=".setDefaultSort"></a>
2744 <div class="fixedFont">
2745 <span class="attributes"></span><b class="itemname">setDefaultSort</b>
2747 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>fieldName</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>dir</i></B>)
2754 <div class="short">Sets the default sort column and order to be used by the next load operation.</div>
2760 Sets the default sort column and order to be used by the next load operation.
2767 <dl class="detailList">
2768 <dt class="heading">Parameters:</dt>
2771 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>fieldName</b>
2774 <dd>The name of the field to sort by.</dd>
2777 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dir</b>
2780 <dd>(optional) The sort order, "ASC" or "DESC" (defaults to "ASC")</dd>
2798 <td class="msource">
2806 <tr class="method-row config-row-alt0 expandable notInherited">
2807 <td class="micon"><a class="exi" href="#expand"> </a></td>
2811 <a id="Roo.data.Store-method-sort" name=".sort"></a>
2812 <div class="fixedFont">
2813 <span class="attributes"></span><b class="itemname">sort</b>
2815 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>fieldName</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>dir</i></B>)
2822 <div class="short">Sort the Records.</div>
2828 Sort the Records.<br/>If remote sorting is used, the sort is performed on the server, and the cache is<br/>reloaded. If local sorting is used, the cache is sorted internally.
2835 <dl class="detailList">
2836 <dt class="heading">Parameters:</dt>
2839 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>fieldName</b>
2842 <dd>The name of the field to sort by.</dd>
2845 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dir</b>
2848 <dd>(optional) The sort order, "ASC" or "DESC" (defaults to "ASC")</dd>
2866 <td class="msource">
2874 <tr class="method-row config-row-alt1 expandable notInherited">
2875 <td class="micon"><a class="exi" href="#expand"> </a></td>
2879 <a id="Roo.data.Store-method-sum" name=".sum"></a>
2880 <div class="fixedFont">
2881 <span class="attributes"></span><b class="itemname">sum</b>
2883 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>property</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>start</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>end</i></B>)
2889 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
2898 <div class="short">Sums the value of <i>property</i> for each record between start and end and returns the result.</div>
2904 Sums the value of <i>property</i> for each record between start and end and returns the result.
2911 <dl class="detailList">
2912 <dt class="heading">Parameters:</dt>
2915 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>property</b>
2918 <dd>A field on your records</dd>
2921 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>start</b>
2924 <dd>The record index to start at (defaults to 0)</dd>
2927 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>end</b>
2930 <dd>The last record index to include (defaults to length - 1)</dd>
2938 <dl class="detailList">
2939 <dt class="heading">Returns:</dt>
2941 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The sum</dd>
2955 <td class="msource">
2963 <tr class="method-row config-row-alt0 expandable">
2964 <td class="micon"><a class="exi" href="#expand"> </a></td>
2968 <a id="Roo.util.Observable-method-un" name=".un"></a>
2969 <div class="fixedFont">
2970 <span class="attributes"></span><b class="itemname">un</b>
2972 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
2979 <div class="short">Removes a listener (shorthand for removeListener)</div>
2985 Removes a listener (shorthand for removeListener)
2992 <dl class="detailList">
2993 <dt class="heading">Parameters:</dt>
2996 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
2999 <dd>The type of event to listen for</dd>
3002 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
3005 <dd>The handler to remove</dd>
3008 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
3011 <dd>(optional) The scope (this object) for the handler</dd>
3029 <td class="msource">
3031 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
3040 <!-- ============================== events summary / details ======================== -->
3043 <a id="Roo.data.Store-events"></a>
3052 <table cellspacing="0" class="member-table">
3053 <caption>Events</caption>
3056 <th class="sig-header" colspan="2">Event</th>
3057 <th class="msource-header">Defined By</th>
3066 <tr class="method-row expandable config-row-alt0 notInherited">
3067 <td class="micon"><a class="exi" href="#expand"> </a></td>
3070 <a id="Roo.data.Store-event-*add"></a>
3072 <div class="fixedFont">
3073 <b class="itemname">add</b> (Store <B><i>this</i></B>, <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[] <B><i>records</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
3079 <div class="short">Fires when Records have been added to the Store
3085 Fires when Records have been added to the Store
3091 <dl class="detailList">
3092 <dt class="heading">Parameters:</dt>
3095 <span class="fixedFont">Store</span> <b>this</b>
3101 <span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]</span> <b>records</b>
3104 <dd>The array of Records added</dd>
3107 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
3110 <dd>The index at which the record(s) were added</dd>
3128 <td class="msource">
3133 <tr class="method-row expandable config-row-alt1 notInherited">
3134 <td class="micon"><a class="exi" href="#expand"> </a></td>
3137 <a id="Roo.data.Store-event-*beforeload"></a>
3139 <div class="fixedFont">
3140 <b class="itemname">beforeload</b> (Store <B><i>this</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
3146 <div class="short">Fires before a request is made for a new data object.
3152 Fires before a request is made for a new data object. If the beforeload handler returns false<br/>the load action will be canceled.
3158 <dl class="detailList">
3159 <dt class="heading">Parameters:</dt>
3162 <span class="fixedFont">Store</span> <b>this</b>
3168 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
3171 <dd>The loading options that were specified (see {<b>link</b> <b>load</b>} for details)</dd>
3189 <td class="msource">
3194 <tr class="method-row expandable config-row-alt0 notInherited">
3195 <td class="micon"><a class="exi" href="#expand"> </a></td>
3198 <a id="Roo.data.Store-event-*beforeloadadd"></a>
3200 <div class="fixedFont">
3201 <b class="itemname">beforeloadadd</b> (Store <B><i>this</i></B>, <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[] <B><i>records</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
3207 <div class="short">Fires after a new set of Records has been loaded.
3213 Fires after a new set of Records has been loaded.
3219 <dl class="detailList">
3220 <dt class="heading">Parameters:</dt>
3223 <span class="fixedFont">Store</span> <b>this</b>
3229 <span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]</span> <b>records</b>
3232 <dd>The Records that were loaded</dd>
3235 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
3238 <dd>The loading options that were specified (see {<b>link</b> <b>load</b>} for details)</dd>
3256 <td class="msource">
3261 <tr class="method-row expandable config-row-alt1 notInherited">
3262 <td class="micon"><a class="exi" href="#expand"> </a></td>
3265 <a id="Roo.data.Store-event-*clear"></a>
3267 <div class="fixedFont">
3268 <b class="itemname">clear</b> (Store <B><i>this</i></B>)
3274 <div class="short">Fires when the data cache has been cleared.
3280 Fires when the data cache has been cleared.
3286 <dl class="detailList">
3287 <dt class="heading">Parameters:</dt>
3290 <span class="fixedFont">Store</span> <b>this</b>
3311 <td class="msource">
3316 <tr class="method-row expandable config-row-alt0 notInherited">
3317 <td class="micon"><a class="exi" href="#expand"> </a></td>
3320 <a id="Roo.data.Store-event-*datachanged"></a>
3322 <div class="fixedFont">
3323 <b class="itemname">datachanged</b> (Store <B><i>this</i></B>)
3329 <div class="short">Fires when the data cache has changed, and a widget which is using this Store<br/>as a Record cache should refresh its view.
3335 Fires when the data cache has changed, and a widget which is using this Store<br/>as a Record cache should refresh its view.
3341 <dl class="detailList">
3342 <dt class="heading">Parameters:</dt>
3345 <span class="fixedFont">Store</span> <b>this</b>
3366 <td class="msource">
3371 <tr class="method-row expandable config-row-alt1 notInherited">
3372 <td class="micon"><a class="exi" href="#expand"> </a></td>
3375 <a id="Roo.data.Store-event-*load"></a>
3377 <div class="fixedFont">
3378 <b class="itemname">load</b> (Store <B><i>this</i></B>, <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[] <B><i>records</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
3384 <div class="short">Fires after a new set of Records has been loaded, before they are added to the store.
3390 Fires after a new set of Records has been loaded, before they are added to the store.
3396 <dl class="detailList">
3397 <dt class="heading">Parameters:</dt>
3400 <span class="fixedFont">Store</span> <b>this</b>
3406 <span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]</span> <b>records</b>
3409 <dd>The Records that were loaded</dd>
3412 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
3415 <dd>The loading options that were specified (see {<b>link</b> <b>load</b>} for details)</dd>
3433 <td class="msource">
3438 <tr class="method-row expandable config-row-alt0 notInherited">
3439 <td class="micon"><a class="exi" href="#expand"> </a></td>
3442 <a id="Roo.data.Store-event-*loadexception"></a>
3444 <div class="fixedFont">
3445 <b class="itemname">loadexception</b> (Proxy <B><i></i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>return</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>load</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>jsonData</i></B>)
3451 <div class="short">Fires if an exception occurs in the Proxy during loading.
3457 Fires if an exception occurs in the Proxy during loading.<br/>Called with the signature of the Proxy's "loadexception" event.<br/>If you return Json { data: [] , success: false, .... } then this will be thrown with the following args
3463 <dl class="detailList">
3464 <dt class="heading">Parameters:</dt>
3467 <span class="fixedFont">Proxy</span> <b></b>
3473 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>return</b>
3476 <dd>from JsonData.reader() - success, totalRecords, records</dd>
3479 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>load</b>
3485 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>jsonData</b>
3488 <dd>from your request (normally this contains the Exception)</dd>
3506 <td class="msource">
3511 <tr class="method-row expandable config-row-alt1 notInherited">
3512 <td class="micon"><a class="exi" href="#expand"> </a></td>
3515 <a id="Roo.data.Store-event-*metachange"></a>
3517 <div class="fixedFont">
3518 <b class="itemname">metachange</b> (Store <B><i>this</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>meta</i></B>)
3524 <div class="short">Fires when this store's reader provides new metadata (fields).
3530 Fires when this store's reader provides new metadata (fields). This is currently only support for JsonReaders.
3536 <dl class="detailList">
3537 <dt class="heading">Parameters:</dt>
3540 <span class="fixedFont">Store</span> <b>this</b>
3546 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>meta</b>
3549 <dd>The JSON metadata</dd>
3567 <td class="msource">
3572 <tr class="method-row expandable config-row-alt0 notInherited">
3573 <td class="micon"><a class="exi" href="#expand"> </a></td>
3576 <a id="Roo.data.Store-event-*remove"></a>
3578 <div class="fixedFont">
3579 <b class="itemname">remove</b> (Store <B><i>this</i></B>, <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a> <B><i>record</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
3585 <div class="short">Fires when a Record has been removed from the Store
3591 Fires when a Record has been removed from the Store
3597 <dl class="detailList">
3598 <dt class="heading">Parameters:</dt>
3601 <span class="fixedFont">Store</span> <b>this</b>
3607 <span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a></span> <b>record</b>
3610 <dd>The Record that was removed</dd>
3613 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
3616 <dd>The index at which the record was removed</dd>
3634 <td class="msource">
3639 <tr class="method-row expandable config-row-alt1 notInherited">
3640 <td class="micon"><a class="exi" href="#expand"> </a></td>
3643 <a id="Roo.data.Store-event-*update"></a>
3645 <div class="fixedFont">
3646 <b class="itemname">update</b> (Store <B><i>this</i></B>, <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a> <B><i>record</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>operation</i></B>)
3652 <div class="short">Fires when a Record has been updated
3658 Fires when a Record has been updated
3664 <dl class="detailList">
3665 <dt class="heading">Parameters:</dt>
3668 <span class="fixedFont">Store</span> <b>this</b>
3674 <span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a></span> <b>record</b>
3677 <dd>The Record that was updated</dd>
3680 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>operation</b>
3683 <dd>The update operation being performed. Value may be one of:<br/><pre><code><br/> Roo.data.Record.EDIT<br/> Roo.data.Record.REJECT<br/> Roo.data.Record.COMMIT<br/></code></pre></dd>
3701 <td class="msource">
3713 <!-- ============================== footer ================================= -->
3714 <div class="fineprint" style="clear:both">
3716 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Thu Apr 24 2014 16:32:57 GMT+0800 (HKT)
3718 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>