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-proxy" name=".proxy"></a>
259 <div class="fixedFont">
260 <b class="itemname">proxy</b> : <a href="./Roo.data.DataProxy.html#constructor" roo:cls="Roo.data.DataProxy.html#constructor">Roo.data.DataProxy</a>
266 <div class="short">The Proxy object which provides access to a data object.</div>
270 <div class="long">The Proxy object which provides access to a data object.</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-pruneModifiedRecords" name=".pruneModifiedRecords"></a>
289 <div class="fixedFont">
290 <b class="itemname">pruneModifiedRecords</b> : boolean
296 <div class="short">True to clear all modified record information each time the store is<br/>loaded or when a record is removed.</div>
300 <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>
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-reader" name=".reader"></a>
319 <div class="fixedFont">
320 <b class="itemname">reader</b> : Roo.data.Reader
326 <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>
330 <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>
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-remoteSort" name=".remoteSort"></a>
349 <div class="fixedFont">
350 <b class="itemname">remoteSort</b> : boolean
356 <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>
360 <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>
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-sortInfo" name=".sortInfo"></a>
379 <div class="fixedFont">
380 <b class="itemname">sortInfo</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
386 <div class="short">A config object in the format: {field: "fieldName", direction: "ASC|DESC"}</div>
390 <div class="long">A config object in the format: {field: "fieldName", direction: "ASC|DESC"}</div>
414 <!-- ============================== public properties ==================== -->
418 <a id="Roo.data.Store-props"></a>
424 <table cellspacing="0" class="member-table">
425 <caption class="Empty">Public Properties - Has None</caption>
431 <!-- ============================== methods summary / details ======================== -->
434 <a id="Roo.data.Store-methods"></a>
435 <!-- constructor?? -->
442 <!-- then dynamics first -->
449 <table cellspacing="0" class="member-table">
450 <caption>Public Methods</caption>
452 <th class="sig-header" colspan="2">Method</th>
453 <th class="msource-header">Defined By</th>
463 <tr class="method-row config-row-alt0 expandable notInherited">
464 <td class="micon"><a class="exi" href="#expand"> </a></td>
468 <a id="Roo.data-method-Store" name=".Store"></a>
469 <div class="fixedFont">
470 <span class="attributes">new <B>Roo.data.</B></span><b class="itemname">Store</b>
472 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
480 <div class="short">Create a new Roo.data.Store</div>
487 Create a new Roo.data.Store
490 <dl class="detailList">
491 <dt class="heading">Parameters:</dt>
494 <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>
497 <dd>A config object containing the objects needed for the Store to access data,<br/>and read the data into Records.</dd>
521 <tr class="method-row config-row-alt1 expandable notInherited">
522 <td class="micon"><a class="exi" href="#expand"> </a></td>
526 <a id="Roo.data.Store-method-add" name=".add"></a>
527 <div class="fixedFont">
528 <span class="attributes"></span><b class="itemname">add</b>
530 (<a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[] <B><i>records</i></B>)
537 <div class="short">Add Records to the Store and fires the add event.</div>
543 Add Records to the Store and fires the add event.
550 <dl class="detailList">
551 <dt class="heading">Parameters:</dt>
554 <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>
557 <dd>An Array of Roo.data.Record objects to add to the cache.</dd>
583 <tr class="method-row config-row-alt0 expandable">
584 <td class="micon"><a class="exi" href="#expand"> </a></td>
588 <a id="Roo.util.Observable-method-addEvents" name=".addEvents"></a>
589 <div class="fixedFont">
590 <span class="attributes"></span><b class="itemname">addEvents</b>
592 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>object</i></B>)
599 <div class="short">Used to define events on this Observable</div>
605 Used to define events on this Observable
612 <dl class="detailList">
613 <dt class="heading">Parameters:</dt>
616 <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>
619 <dd>The object with the events defined</dd>
639 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
645 <tr class="method-row config-row-alt1 expandable">
646 <td class="micon"><a class="exi" href="#expand"> </a></td>
650 <a id="Roo.util.Observable-method-addListener" name=".addListener"></a>
651 <div class="fixedFont">
652 <span class="attributes"></span><b class="itemname">addListener</b>
654 (<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>)
661 <div class="short">Appends an event handler to this component</div>
667 Appends an event handler to this component
674 <dl class="detailList">
675 <dt class="heading">Parameters:</dt>
678 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
681 <dd>The type of event to listen for</dd>
684 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
687 <dd>The method the event invokes</dd>
690 <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>
693 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
696 <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>
699 <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>
719 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
725 <tr class="method-row config-row-alt0 expandable notInherited">
726 <td class="micon"><a class="exi" href="#expand"> </a></td>
730 <a id="Roo.data.Store-method-clearFilter" name=".clearFilter"></a>
731 <div class="fixedFont">
732 <span class="attributes"></span><b class="itemname">clearFilter</b>
734 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>suppressEvent</i></B>)
741 <div class="short">Revert to a view of the Record cache with no filtering applied.</div>
747 Revert to a view of the Record cache with no filtering applied.
754 <dl class="detailList">
755 <dt class="heading">Parameters:</dt>
758 <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>
761 <dd>If true the filter is cleared silently without notifying listeners</dd>
787 <tr class="method-row config-row-alt1 expandable notInherited">
788 <td class="micon"><a class="exi" href="#expand"> </a></td>
792 <a id="Roo.data.Store-method-collect" name=".collect"></a>
793 <div class="fixedFont">
794 <span class="attributes"></span><b class="itemname">collect</b>
796 (<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>)
802 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
811 <div class="short">Collects unique values for a particular dataIndex from this store.</div>
817 Collects unique values for a particular dataIndex from this store.
824 <dl class="detailList">
825 <dt class="heading">Parameters:</dt>
828 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dataIndex</b>
831 <dd>The property to collect</dd>
834 <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>
837 <dd>(optional) Pass true to allow null, undefined or empty string values</dd>
840 <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>
843 <dd>(optional) Pass true to collect from all records, even ones which are filtered</dd>
851 <dl class="detailList">
852 <dt class="heading">Returns:</dt>
854 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> An array of the unique values</dd>
876 <tr class="method-row config-row-alt0 expandable notInherited">
877 <td class="micon"><a class="exi" href="#expand"> </a></td>
881 <a id="Roo.data.Store-method-commitChanges" name=".commitChanges"></a>
882 <div class="fixedFont">
883 <span class="attributes"></span><b class="itemname">commitChanges</b>
892 <div class="short">Commit all Records with outstanding changes.</div>
898 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.
927 <tr class="method-row config-row-alt1 expandable notInherited">
928 <td class="micon"><a class="exi" href="#expand"> </a></td>
932 <a id="Roo.data.Store-method-each" name=".each"></a>
933 <div class="fixedFont">
934 <span class="attributes"></span><b class="itemname">each</b>
936 (<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>)
943 <div class="short">Calls the specified function for each of the Records in the cache.</div>
949 Calls the specified function for each of the Records in the cache.
956 <dl class="detailList">
957 <dt class="heading">Parameters:</dt>
960 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
963 <dd>The function to call. The Record is passed as the first parameter.<br/>Returning <em>false</em> aborts and exits the iteration.</dd>
966 <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>
969 <dd>(optional) The scope in which to call the function (defaults to the Record).</dd>
995 <tr class="method-row config-row-alt0 expandable notInherited">
996 <td class="micon"><a class="exi" href="#expand"> </a></td>
1000 <a id="Roo.data.Store-method-filter" name=".filter"></a>
1001 <div class="fixedFont">
1002 <span class="attributes"></span><b class="itemname">filter</b>
1004 (<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>)
1011 <div class="short">Filter the records by a specified property.</div>
1017 Filter the records by a specified property.
1024 <dl class="detailList">
1025 <dt class="heading">Parameters:</dt>
1028 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>field</b>
1031 <dd>A field on your records</dd>
1034 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp</span> <b>value</b>
1037 <dd>Either a string that the field<br/>should start with or a RegExp to test against the field</dd>
1040 <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>
1043 <dd>True to match any part not just the beginning</dd>
1061 <td class="msource">
1069 <tr class="method-row config-row-alt1 expandable notInherited">
1070 <td class="micon"><a class="exi" href="#expand"> </a></td>
1074 <a id="Roo.data.Store-method-filterBy" name=".filterBy"></a>
1075 <div class="fixedFont">
1076 <span class="attributes"></span><b class="itemname">filterBy</b>
1078 (<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>)
1085 <div class="short">Filter by a function.</div>
1091 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.
1098 <dl class="detailList">
1099 <dt class="heading">Parameters:</dt>
1102 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
1105 <dd>The function to be called, it will receive 2 args (record, id)</dd>
1108 <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>
1111 <dd>(optional) The scope of the function (defaults to this)</dd>
1129 <td class="msource">
1137 <tr class="method-row config-row-alt0 expandable">
1138 <td class="micon"><a class="exi" href="#expand"> </a></td>
1142 <a id="Roo.util.Observable-method-fireEvent" name=".fireEvent"></a>
1143 <div class="fixedFont">
1144 <span class="attributes"></span><b class="itemname">fireEvent</b>
1146 (<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>)
1152 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1161 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
1167 Fires the specified event with the passed parameters (minus the event name).
1174 <dl class="detailList">
1175 <dt class="heading">Parameters:</dt>
1178 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1184 <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>
1187 <dd>Variable number of parameters are passed to handlers</dd>
1195 <dl class="detailList">
1196 <dt class="heading">Returns:</dt>
1198 <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>
1212 <td class="msource">
1214 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1220 <tr class="method-row config-row-alt1 expandable notInherited">
1221 <td class="micon"><a class="exi" href="#expand"> </a></td>
1225 <a id="Roo.data.Store-method-getAt" name=".getAt"></a>
1226 <div class="fixedFont">
1227 <span class="attributes"></span><b class="itemname">getAt</b>
1229 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
1235 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>
1244 <div class="short">Get the Record at the specified index.</div>
1250 Get the Record at the specified index.
1257 <dl class="detailList">
1258 <dt class="heading">Parameters:</dt>
1261 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1264 <dd>The index of the Record to find.</dd>
1272 <dl class="detailList">
1273 <dt class="heading">Returns:</dt>
1275 <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>
1289 <td class="msource">
1297 <tr class="method-row config-row-alt0 expandable notInherited">
1298 <td class="micon"><a class="exi" href="#expand"> </a></td>
1302 <a id="Roo.data.Store-method-getById" name=".getById"></a>
1303 <div class="fixedFont">
1304 <span class="attributes"></span><b class="itemname">getById</b>
1306 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
1312 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>
1321 <div class="short">Get the Record with the specified id.</div>
1327 Get the Record with the specified id.
1334 <dl class="detailList">
1335 <dt class="heading">Parameters:</dt>
1338 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
1341 <dd>The id of the Record to find.</dd>
1349 <dl class="detailList">
1350 <dt class="heading">Returns:</dt>
1352 <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>
1366 <td class="msource">
1374 <tr class="method-row config-row-alt1 expandable notInherited">
1375 <td class="micon"><a class="exi" href="#expand"> </a></td>
1379 <a id="Roo.data.Store-method-getCount" name=".getCount"></a>
1380 <div class="fixedFont">
1381 <span class="attributes"></span><b class="itemname">getCount</b>
1390 <div class="short">Gets the number of cached records.</div>
1396 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>
1417 <td class="msource">
1425 <tr class="method-row config-row-alt0 expandable notInherited">
1426 <td class="micon"><a class="exi" href="#expand"> </a></td>
1430 <a id="Roo.data.Store-method-getModifiedRecords" name=".getModifiedRecords"></a>
1431 <div class="fixedFont">
1432 <span class="attributes"></span><b class="itemname">getModifiedRecords</b>
1440 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]
1449 <div class="short">Gets all records modified since the last commit.</div>
1455 Gets all records modified since the last commit. Modified records are persisted across load operations<br/>(e.g., during paging).
1466 <dl class="detailList">
1467 <dt class="heading">Returns:</dt>
1469 <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>
1483 <td class="msource">
1491 <tr class="method-row config-row-alt1 expandable notInherited">
1492 <td class="micon"><a class="exi" href="#expand"> </a></td>
1496 <a id="Roo.data.Store-method-getRange" name=".getRange"></a>
1497 <div class="fixedFont">
1498 <span class="attributes"></span><b class="itemname">getRange</b>
1500 (<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>)
1506 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]
1515 <div class="short">Returns a range of Records between specified indices.</div>
1521 Returns a range of Records between specified indices.
1528 <dl class="detailList">
1529 <dt class="heading">Parameters:</dt>
1532 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>startIndex</b>
1535 <dd>(optional) The starting index (defaults to 0)</dd>
1538 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>endIndex</b>
1541 <dd>(optional) The ending index (defaults to the last Record in the Store)</dd>
1549 <dl class="detailList">
1550 <dt class="heading">Returns:</dt>
1552 <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>
1566 <td class="msource">
1574 <tr class="method-row config-row-alt0 expandable notInherited">
1575 <td class="micon"><a class="exi" href="#expand"> </a></td>
1579 <a id="Roo.data.Store-method-getSortState" name=".getSortState"></a>
1580 <div class="fixedFont">
1581 <span class="attributes"></span><b class="itemname">getSortState</b>
1590 <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>
1596 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>
1617 <td class="msource">
1625 <tr class="method-row config-row-alt1 expandable notInherited">
1626 <td class="micon"><a class="exi" href="#expand"> </a></td>
1630 <a id="Roo.data.Store-method-getTotalCount" name=".getTotalCount"></a>
1631 <div class="fixedFont">
1632 <span class="attributes"></span><b class="itemname">getTotalCount</b>
1641 <div class="short">Gets the total number of records in the dataset as returned by the server.</div>
1647 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>
1668 <td class="msource">
1676 <tr class="method-row config-row-alt0 expandable">
1677 <td class="micon"><a class="exi" href="#expand"> </a></td>
1681 <a id="Roo.util.Observable-method-hasListener" name=".hasListener"></a>
1682 <div class="fixedFont">
1683 <span class="attributes"></span><b class="itemname">hasListener</b>
1685 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>)
1691 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1700 <div class="short">Checks to see if this object has any listeners for a specified event</div>
1706 Checks to see if this object has any listeners for a specified event
1713 <dl class="detailList">
1714 <dt class="heading">Parameters:</dt>
1717 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1720 <dd>The name of the event to check for</dd>
1728 <dl class="detailList">
1729 <dt class="heading">Returns:</dt>
1731 <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>
1745 <td class="msource">
1747 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1753 <tr class="method-row config-row-alt1 expandable notInherited">
1754 <td class="micon"><a class="exi" href="#expand"> </a></td>
1758 <a id="Roo.data.Store-method-indexOf" name=".indexOf"></a>
1759 <div class="fixedFont">
1760 <span class="attributes"></span><b class="itemname">indexOf</b>
1762 (<a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a> <B><i>record</i></B>)
1768 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1777 <div class="short">Get the index within the cache of the passed Record.</div>
1783 Get the index within the cache of the passed Record.
1790 <dl class="detailList">
1791 <dt class="heading">Parameters:</dt>
1794 <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>
1797 <dd>The Roo.data.Record object to to find.</dd>
1805 <dl class="detailList">
1806 <dt class="heading">Returns:</dt>
1808 <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>
1822 <td class="msource">
1830 <tr class="method-row config-row-alt0 expandable notInherited">
1831 <td class="micon"><a class="exi" href="#expand"> </a></td>
1835 <a id="Roo.data.Store-method-indexOfId" name=".indexOfId"></a>
1836 <div class="fixedFont">
1837 <span class="attributes"></span><b class="itemname">indexOfId</b>
1839 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
1845 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1854 <div class="short">Get the index within the cache of the Record with the passed id.</div>
1860 Get the index within the cache of the Record with the passed id.
1867 <dl class="detailList">
1868 <dt class="heading">Parameters:</dt>
1871 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
1874 <dd>The id of the Record to find.</dd>
1882 <dl class="detailList">
1883 <dt class="heading">Returns:</dt>
1885 <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>
1899 <td class="msource">
1907 <tr class="method-row config-row-alt1 expandable notInherited">
1908 <td class="micon"><a class="exi" href="#expand"> </a></td>
1912 <a id="Roo.data.Store-method-insert" name=".insert"></a>
1913 <div class="fixedFont">
1914 <span class="attributes"></span><b class="itemname">insert</b>
1916 (<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>)
1923 <div class="short">Inserts Records to the Store at the given index and fires the add event.</div>
1929 Inserts Records to the Store at the given index and fires the add event.
1936 <dl class="detailList">
1937 <dt class="heading">Parameters:</dt>
1940 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1943 <dd>The start index at which to insert the passed Records.</dd>
1946 <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>
1949 <dd>An Array of Roo.data.Record objects to add to the cache.</dd>
1967 <td class="msource">
1975 <tr class="method-row config-row-alt0 expandable notInherited">
1976 <td class="micon"><a class="exi" href="#expand"> </a></td>
1980 <a id="Roo.data.Store-method-load" name=".load"></a>
1981 <div class="fixedFont">
1982 <span class="attributes"></span><b class="itemname">load</b>
1984 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
1991 <div class="short">Loads the Record cache from the configured Proxy using the configured Reader.</div>
1997 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>
2004 <dl class="detailList">
2005 <dt class="heading">Parameters:</dt>
2008 <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>
2011 <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>
2029 <td class="msource">
2037 <tr class="method-row config-row-alt1 expandable notInherited">
2038 <td class="micon"><a class="exi" href="#expand"> </a></td>
2042 <a id="Roo.data.Store-method-loadData" name=".loadData"></a>
2043 <div class="fixedFont">
2044 <span class="attributes"></span><b class="itemname">loadData</b>
2046 (<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>)
2053 <div class="short">Loads data from a passed data block.</div>
2059 Loads data from a passed data block. A Reader which understands the format of the data<br/>must have been configured in the constructor.
2066 <dl class="detailList">
2067 <dt class="heading">Parameters:</dt>
2070 <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>
2073 <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>
2076 <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>
2079 <dd>(Optional) True to append the new Records rather than replace the existing cache.</dd>
2097 <td class="msource">
2105 <tr class="method-row config-row-alt0 expandable">
2106 <td class="micon"><a class="exi" href="#expand"> </a></td>
2110 <a id="Roo.util.Observable-method-on" name=".on"></a>
2111 <div class="fixedFont">
2112 <span class="attributes"></span><b class="itemname">on</b>
2114 (<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>)
2121 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
2127 Appends an event handler to this element (shorthand for addListener)
2134 <dl class="detailList">
2135 <dt class="heading">Parameters:</dt>
2138 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
2141 <dd>The type of event to listen for</dd>
2144 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
2147 <dd>The method the event invokes</dd>
2150 <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>
2153 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
2156 <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>
2177 <td class="msource">
2179 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2185 <tr class="method-row config-row-alt1 expandable">
2186 <td class="micon"><a class="exi" href="#expand"> </a></td>
2190 <a id="Roo.util.Observable-method-purgeListeners" name=".purgeListeners"></a>
2191 <div class="fixedFont">
2192 <span class="attributes"></span><b class="itemname">purgeListeners</b>
2201 <div class="short">Removes all listeners for this object</div>
2207 Removes all listeners for this object
2228 <td class="msource">
2230 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2236 <tr class="method-row config-row-alt0 expandable notInherited">
2237 <td class="micon"><a class="exi" href="#expand"> </a></td>
2241 <a id="Roo.data.Store-method-query" name=".query"></a>
2242 <div class="fixedFont">
2243 <span class="attributes"></span><b class="itemname">query</b>
2245 (<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>)
2260 <div class="short">Query the records by a specified property.</div>
2266 Query the records by a specified property.
2273 <dl class="detailList">
2274 <dt class="heading">Parameters:</dt>
2277 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>field</b>
2280 <dd>A field on your records</dd>
2283 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp</span> <b>value</b>
2286 <dd>Either a string that the field<br/>should start with or a RegExp to test against the field</dd>
2289 <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>
2292 <dd>True to match any part not just the beginning</dd>
2300 <dl class="detailList">
2301 <dt class="heading">Returns:</dt>
2303 <dd><span class="fixedFont">MixedCollection</span> Returns an Roo.util.MixedCollection of the matched records</dd>
2317 <td class="msource">
2325 <tr class="method-row config-row-alt1 expandable notInherited">
2326 <td class="micon"><a class="exi" href="#expand"> </a></td>
2330 <a id="Roo.data.Store-method-queryBy" name=".queryBy"></a>
2331 <div class="fixedFont">
2332 <span class="attributes"></span><b class="itemname">queryBy</b>
2334 (<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>)
2349 <div class="short">Query by a function.</div>
2355 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.
2362 <dl class="detailList">
2363 <dt class="heading">Parameters:</dt>
2366 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
2369 <dd>The function to be called, it will receive 2 args (record, id)</dd>
2372 <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>
2375 <dd>(optional) The scope of the function (defaults to this)</dd>
2383 <dl class="detailList">
2384 <dt class="heading">Returns:</dt>
2386 <dd><span class="fixedFont">MixedCollection</span> Returns an Roo.util.MixedCollection of the matched records</dd>
2400 <td class="msource">
2408 <tr class="method-row config-row-alt0 expandable notInherited">
2409 <td class="micon"><a class="exi" href="#expand"> </a></td>
2413 <a id="Roo.data.Store-method-rejectChanges" name=".rejectChanges"></a>
2414 <div class="fixedFont">
2415 <span class="attributes"></span><b class="itemname">rejectChanges</b>
2424 <div class="short">Cancel outstanding changes on all changed records.</div>
2430 Cancel outstanding changes on all changed records.
2451 <td class="msource">
2459 <tr class="method-row config-row-alt1 expandable notInherited">
2460 <td class="micon"><a class="exi" href="#expand"> </a></td>
2464 <a id="Roo.data.Store-method-reload" name=".reload"></a>
2465 <div class="fixedFont">
2466 <span class="attributes"></span><b class="itemname">reload</b>
2468 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
2475 <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>
2481 Reloads the Record cache from the configured Proxy using the configured Reader and<br/>the options from the last load operation performed.
2488 <dl class="detailList">
2489 <dt class="heading">Parameters:</dt>
2492 <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>
2495 <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>
2513 <td class="msource">
2521 <tr class="method-row config-row-alt0 expandable notInherited">
2522 <td class="micon"><a class="exi" href="#expand"> </a></td>
2526 <a id="Roo.data.Store-method-remove" name=".remove"></a>
2527 <div class="fixedFont">
2528 <span class="attributes"></span><b class="itemname">remove</b>
2530 (Ext.data.Record <B><i>record</i></B>)
2537 <div class="short">Remove a Record from the Store and fires the remove event.</div>
2543 Remove a Record from the Store and fires the remove event.
2550 <dl class="detailList">
2551 <dt class="heading">Parameters:</dt>
2554 <span class="fixedFont">Ext.data.Record</span> <b>record</b>
2557 <dd>The Roo.data.Record object to remove from the cache.</dd>
2575 <td class="msource">
2583 <tr class="method-row config-row-alt1 expandable notInherited">
2584 <td class="micon"><a class="exi" href="#expand"> </a></td>
2588 <a id="Roo.data.Store-method-removeAll" name=".removeAll"></a>
2589 <div class="fixedFont">
2590 <span class="attributes"></span><b class="itemname">removeAll</b>
2599 <div class="short">Remove all Records from the Store and fires the clear event.</div>
2605 Remove all Records from the Store and fires the clear event.
2626 <td class="msource">
2634 <tr class="method-row config-row-alt0 expandable">
2635 <td class="micon"><a class="exi" href="#expand"> </a></td>
2639 <a id="Roo.util.Observable-method-removeListener" name=".removeListener"></a>
2640 <div class="fixedFont">
2641 <span class="attributes"></span><b class="itemname">removeListener</b>
2643 (<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>)
2650 <div class="short">Removes a listener</div>
2663 <dl class="detailList">
2664 <dt class="heading">Parameters:</dt>
2667 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
2670 <dd>The type of event to listen for</dd>
2673 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
2676 <dd>The handler to remove</dd>
2679 <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>
2682 <dd>(optional) The scope (this object) for the handler</dd>
2700 <td class="msource">
2702 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2708 <tr class="method-row config-row-alt1 expandable notInherited">
2709 <td class="micon"><a class="exi" href="#expand"> </a></td>
2713 <a id="Roo.data.Store-method-setDefaultSort" name=".setDefaultSort"></a>
2714 <div class="fixedFont">
2715 <span class="attributes"></span><b class="itemname">setDefaultSort</b>
2717 (<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>)
2724 <div class="short">Sets the default sort column and order to be used by the next load operation.</div>
2730 Sets the default sort column and order to be used by the next load operation.
2737 <dl class="detailList">
2738 <dt class="heading">Parameters:</dt>
2741 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>fieldName</b>
2744 <dd>The name of the field to sort by.</dd>
2747 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dir</b>
2750 <dd>(optional) The sort order, "ASC" or "DESC" (defaults to "ASC")</dd>
2768 <td class="msource">
2776 <tr class="method-row config-row-alt0 expandable notInherited">
2777 <td class="micon"><a class="exi" href="#expand"> </a></td>
2781 <a id="Roo.data.Store-method-sort" name=".sort"></a>
2782 <div class="fixedFont">
2783 <span class="attributes"></span><b class="itemname">sort</b>
2785 (<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>)
2792 <div class="short">Sort the Records.</div>
2798 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.
2805 <dl class="detailList">
2806 <dt class="heading">Parameters:</dt>
2809 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>fieldName</b>
2812 <dd>The name of the field to sort by.</dd>
2815 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dir</b>
2818 <dd>(optional) The sort order, "ASC" or "DESC" (defaults to "ASC")</dd>
2836 <td class="msource">
2844 <tr class="method-row config-row-alt1 expandable notInherited">
2845 <td class="micon"><a class="exi" href="#expand"> </a></td>
2849 <a id="Roo.data.Store-method-sum" name=".sum"></a>
2850 <div class="fixedFont">
2851 <span class="attributes"></span><b class="itemname">sum</b>
2853 (<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>)
2859 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
2868 <div class="short">Sums the value of <i>property</i> for each record between start and end and returns the result.</div>
2874 Sums the value of <i>property</i> for each record between start and end and returns the result.
2881 <dl class="detailList">
2882 <dt class="heading">Parameters:</dt>
2885 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>property</b>
2888 <dd>A field on your records</dd>
2891 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>start</b>
2894 <dd>The record index to start at (defaults to 0)</dd>
2897 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>end</b>
2900 <dd>The last record index to include (defaults to length - 1)</dd>
2908 <dl class="detailList">
2909 <dt class="heading">Returns:</dt>
2911 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The sum</dd>
2925 <td class="msource">
2933 <tr class="method-row config-row-alt0 expandable">
2934 <td class="micon"><a class="exi" href="#expand"> </a></td>
2938 <a id="Roo.util.Observable-method-un" name=".un"></a>
2939 <div class="fixedFont">
2940 <span class="attributes"></span><b class="itemname">un</b>
2942 (<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>)
2949 <div class="short">Removes a listener (shorthand for removeListener)</div>
2955 Removes a listener (shorthand for removeListener)
2962 <dl class="detailList">
2963 <dt class="heading">Parameters:</dt>
2966 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
2969 <dd>The type of event to listen for</dd>
2972 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
2975 <dd>The handler to remove</dd>
2978 <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>
2981 <dd>(optional) The scope (this object) for the handler</dd>
2999 <td class="msource">
3001 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
3010 <!-- ============================== events summary / details ======================== -->
3013 <a id="Roo.data.Store-events"></a>
3022 <table cellspacing="0" class="member-table">
3023 <caption>Events</caption>
3026 <th class="sig-header" colspan="2">Event</th>
3027 <th class="msource-header">Defined By</th>
3036 <tr class="method-row expandable config-row-alt0 notInherited">
3037 <td class="micon"><a class="exi" href="#expand"> </a></td>
3040 <a id="Roo.data.Store-event-*add"></a>
3042 <div class="fixedFont">
3043 <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>)
3049 <div class="short">Fires when Records have been added to the Store
3055 Fires when Records have been added to the Store
3061 <dl class="detailList">
3062 <dt class="heading">Parameters:</dt>
3065 <span class="fixedFont">Store</span> <b>this</b>
3071 <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>
3074 <dd>The array of Records added</dd>
3077 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
3080 <dd>The index at which the record(s) were added</dd>
3098 <td class="msource">
3103 <tr class="method-row expandable config-row-alt1 notInherited">
3104 <td class="micon"><a class="exi" href="#expand"> </a></td>
3107 <a id="Roo.data.Store-event-*beforeload"></a>
3109 <div class="fixedFont">
3110 <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>)
3116 <div class="short">Fires before a request is made for a new data object.
3122 Fires before a request is made for a new data object. If the beforeload handler returns false<br/>the load action will be canceled.
3128 <dl class="detailList">
3129 <dt class="heading">Parameters:</dt>
3132 <span class="fixedFont">Store</span> <b>this</b>
3138 <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>
3141 <dd>The loading options that were specified (see {<b>link</b> <b>load</b>} for details)</dd>
3159 <td class="msource">
3164 <tr class="method-row expandable config-row-alt0 notInherited">
3165 <td class="micon"><a class="exi" href="#expand"> </a></td>
3168 <a id="Roo.data.Store-event-*clear"></a>
3170 <div class="fixedFont">
3171 <b class="itemname">clear</b> (Store <B><i>this</i></B>)
3177 <div class="short">Fires when the data cache has been cleared.
3183 Fires when the data cache has been cleared.
3189 <dl class="detailList">
3190 <dt class="heading">Parameters:</dt>
3193 <span class="fixedFont">Store</span> <b>this</b>
3214 <td class="msource">
3219 <tr class="method-row expandable config-row-alt1 notInherited">
3220 <td class="micon"><a class="exi" href="#expand"> </a></td>
3223 <a id="Roo.data.Store-event-*datachanged"></a>
3225 <div class="fixedFont">
3226 <b class="itemname">datachanged</b> (Store <B><i>this</i></B>)
3232 <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.
3238 Fires when the data cache has changed, and a widget which is using this Store<br/>as a Record cache should refresh its view.
3244 <dl class="detailList">
3245 <dt class="heading">Parameters:</dt>
3248 <span class="fixedFont">Store</span> <b>this</b>
3269 <td class="msource">
3274 <tr class="method-row expandable config-row-alt0 notInherited">
3275 <td class="micon"><a class="exi" href="#expand"> </a></td>
3278 <a id="Roo.data.Store-event-*load"></a>
3280 <div class="fixedFont">
3281 <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>)
3287 <div class="short">Fires after a new set of Records has been loaded.
3293 Fires after a new set of Records has been loaded.
3299 <dl class="detailList">
3300 <dt class="heading">Parameters:</dt>
3303 <span class="fixedFont">Store</span> <b>this</b>
3309 <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>
3312 <dd>The Records that were loaded</dd>
3315 <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>
3318 <dd>The loading options that were specified (see {<b>link</b> <b>load</b>} for details)</dd>
3336 <td class="msource">
3341 <tr class="method-row expandable config-row-alt1 notInherited">
3342 <td class="micon"><a class="exi" href="#expand"> </a></td>
3345 <a id="Roo.data.Store-event-*loadexception"></a>
3347 <div class="fixedFont">
3348 <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>)
3354 <div class="short">Fires if an exception occurs in the Proxy during loading.
3360 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
3366 <dl class="detailList">
3367 <dt class="heading">Parameters:</dt>
3370 <span class="fixedFont">Proxy</span> <b></b>
3376 <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>
3379 <dd>from JsonData.reader() - success, totalRecords, records</dd>
3382 <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>
3388 <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>
3391 <dd>from your request (normally this contains the Exception)</dd>
3409 <td class="msource">
3414 <tr class="method-row expandable config-row-alt0 notInherited">
3415 <td class="micon"><a class="exi" href="#expand"> </a></td>
3418 <a id="Roo.data.Store-event-*metachange"></a>
3420 <div class="fixedFont">
3421 <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>)
3427 <div class="short">Fires when this store's reader provides new metadata (fields).
3433 Fires when this store's reader provides new metadata (fields). This is currently only support for JsonReaders.
3439 <dl class="detailList">
3440 <dt class="heading">Parameters:</dt>
3443 <span class="fixedFont">Store</span> <b>this</b>
3449 <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>
3452 <dd>The JSON metadata</dd>
3470 <td class="msource">
3475 <tr class="method-row expandable config-row-alt1 notInherited">
3476 <td class="micon"><a class="exi" href="#expand"> </a></td>
3479 <a id="Roo.data.Store-event-*remove"></a>
3481 <div class="fixedFont">
3482 <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>)
3488 <div class="short">Fires when a Record has been removed from the Store
3494 Fires when a Record has been removed from the Store
3500 <dl class="detailList">
3501 <dt class="heading">Parameters:</dt>
3504 <span class="fixedFont">Store</span> <b>this</b>
3510 <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>
3513 <dd>The Record that was removed</dd>
3516 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
3519 <dd>The index at which the record was removed</dd>
3537 <td class="msource">
3542 <tr class="method-row expandable config-row-alt0 notInherited">
3543 <td class="micon"><a class="exi" href="#expand"> </a></td>
3546 <a id="Roo.data.Store-event-*update"></a>
3548 <div class="fixedFont">
3549 <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>)
3555 <div class="short">Fires when a Record has been updated
3561 Fires when a Record has been updated
3567 <dl class="detailList">
3568 <dt class="heading">Parameters:</dt>
3571 <span class="fixedFont">Store</span> <b>this</b>
3577 <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>
3580 <dd>The Record that was updated</dd>
3583 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>operation</b>
3586 <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>
3604 <td class="msource">
3616 <!-- ============================== footer ================================= -->
3617 <div class="fineprint" style="clear:both">
3619 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Tue Jul 27 2010 11:50:33 GMT+0800 (HKT)
3621 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>