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>
151 An object containing properties which are to be sent as parameters<br/>on any HTTP request
167 <tr class="config-row expandable config-row-alt1 notInherited">
168 <td class="micon"><a class="exi" href="#expand"> </a></td>
171 <a id="Roo.data.Store-cfg-data" name=".data"></a>
172 <div class="fixedFont">
173 <b class="itemname">data</b> : <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
179 <div class="short">Inline data to be loaded when the store is initialized.</div>
184 Inline data to be loaded when the store is initialized.
200 <tr class="config-row expandable config-row-alt0 notInherited">
201 <td class="micon"><a class="exi" href="#expand"> </a></td>
204 <a id="Roo.data.Store-cfg-isLocal" name=".isLocal"></a>
205 <div class="fixedFont">
206 <b class="itemname">isLocal</b> : boolean
212 <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>
217 flag if data is locally available (and can be always looked up<br/>without a remote query - used by combo/forms at present.
233 <tr class="config-row expandable config-row-alt1">
234 <td class="micon"><a class="exi" href="#expand"> </a></td>
237 <a id="Roo.util.Observable-cfg-listeners" name=".listeners"></a>
238 <div class="fixedFont">
239 <b class="itemname">listeners</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
245 <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>
250 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>
260 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
266 <tr class="config-row expandable config-row-alt0 notInherited">
267 <td class="micon"><a class="exi" href="#expand"> </a></td>
270 <a id="Roo.data.Store-cfg-multiSort" name=".multiSort"></a>
271 <div class="fixedFont">
272 <b class="itemname">multiSort</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
278 <div class="short">enable multi column sorting (sort is based on the order of columns, remote only at present)</div>
283 enable multi column sorting (sort is based on the order of columns, remote only at present)
299 <tr class="config-row expandable config-row-alt1 notInherited">
300 <td class="micon"><a class="exi" href="#expand"> </a></td>
303 <a id="Roo.data.Store-cfg-proxy" name=".proxy"></a>
304 <div class="fixedFont">
305 <b class="itemname">proxy</b> : <a href="./Roo.data.DataProxy.html#constructor" roo:cls="Roo.data.DataProxy.html#constructor">Roo.data.DataProxy</a>
311 <div class="short">The Proxy object which provides access to a data object.</div>
316 The Proxy object which provides access to a data object.
332 <tr class="config-row expandable config-row-alt0 notInherited">
333 <td class="micon"><a class="exi" href="#expand"> </a></td>
336 <a id="Roo.data.Store-cfg-pruneModifiedRecords" name=".pruneModifiedRecords"></a>
337 <div class="fixedFont">
338 <b class="itemname">pruneModifiedRecords</b> : boolean
344 <div class="short">True to clear all modified record information each time the store is<br/>loaded or when a record is removed.</div>
349 True to clear all modified record information each time the store is<br/>loaded or when a record is removed. (defaults to false).
365 <tr class="config-row expandable config-row-alt1 notInherited">
366 <td class="micon"><a class="exi" href="#expand"> </a></td>
369 <a id="Roo.data.Store-cfg-reader" name=".reader"></a>
370 <div class="fixedFont">
371 <b class="itemname">reader</b> : Roo.data.Reader
377 <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>
382 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.
398 <tr class="config-row expandable config-row-alt0 notInherited">
399 <td class="micon"><a class="exi" href="#expand"> </a></td>
402 <a id="Roo.data.Store-cfg-remoteSort" name=".remoteSort"></a>
403 <div class="fixedFont">
404 <b class="itemname">remoteSort</b> : boolean
410 <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>
415 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).
431 <tr class="config-row expandable config-row-alt1 notInherited">
432 <td class="micon"><a class="exi" href="#expand"> </a></td>
435 <a id="Roo.data.Store-cfg-sortInfo" name=".sortInfo"></a>
436 <div class="fixedFont">
437 <b class="itemname">sortInfo</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
443 <div class="short">A config object in the format: {field: "fieldName", direction: "ASC|DESC"}</div>
448 A config object in the format: {field: "fieldName", direction: "ASC|DESC"}
474 <!-- ============================== public properties ==================== -->
478 <a id="Roo.data.Store-props"></a>
484 <table cellspacing="0" class="member-table">
485 <caption class="Empty">Public Properties - Has None</caption>
491 <!-- ============================== methods summary / details ======================== -->
494 <a id="Roo.data.Store-methods"></a>
495 <!-- constructor?? -->
502 <!-- then dynamics first -->
509 <table cellspacing="0" class="member-table">
510 <caption>Public Methods</caption>
512 <th class="sig-header" colspan="2">Method</th>
513 <th class="msource-header">Defined By</th>
523 <tr class="method-row config-row-alt0 expandable notInherited">
524 <td class="micon"><a class="exi" href="#expand"> </a></td>
528 <a id="Roo.data-method-Store" name=".Store"></a>
529 <div class="fixedFont">
530 <span class="attributes">new <B>Roo.data.</B></span><b class="itemname">Store</b>
532 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
540 <div class="short">Create a new Roo.data.Store</div>
547 Create a new Roo.data.Store
550 <dl class="detailList">
551 <dt class="heading">Parameters:</dt>
554 <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>
557 <dd>A config object containing the objects needed for the Store to access data,<br/>and read the data into Records.</dd>
581 <tr class="method-row config-row-alt1 expandable notInherited">
582 <td class="micon"><a class="exi" href="#expand"> </a></td>
586 <a id="Roo.data.Store-method-add" name=".add"></a>
587 <div class="fixedFont">
588 <span class="attributes"></span><b class="itemname">add</b>
590 (<a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[] <B><i>records</i></B>)
597 <div class="short">Add Records to the Store and fires the add event.</div>
603 Add Records to the Store and fires the add event.
610 <dl class="detailList">
611 <dt class="heading">Parameters:</dt>
614 <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>
617 <dd>An Array of Roo.data.Record objects to add to the cache.</dd>
643 <tr class="method-row config-row-alt0 expandable">
644 <td class="micon"><a class="exi" href="#expand"> </a></td>
648 <a id="Roo.util.Observable-method-addEvents" name=".addEvents"></a>
649 <div class="fixedFont">
650 <span class="attributes"></span><b class="itemname">addEvents</b>
652 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>object</i></B>)
659 <div class="short">Used to define events on this Observable</div>
665 Used to define events on this Observable
672 <dl class="detailList">
673 <dt class="heading">Parameters:</dt>
676 <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>
679 <dd>The object with the events defined</dd>
699 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
705 <tr class="method-row config-row-alt1 expandable">
706 <td class="micon"><a class="exi" href="#expand"> </a></td>
710 <a id="Roo.util.Observable-method-addListener" name=".addListener"></a>
711 <div class="fixedFont">
712 <span class="attributes"></span><b class="itemname">addListener</b>
714 (<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>)
721 <div class="short">Appends an event handler to this component</div>
727 Appends an event handler to this component
734 <dl class="detailList">
735 <dt class="heading">Parameters:</dt>
738 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
741 <dd>The type of event to listen for</dd>
744 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
747 <dd>The method the event invokes</dd>
750 <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>
753 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
756 <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>
759 <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>
779 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
785 <tr class="method-row config-row-alt0 expandable notInherited">
786 <td class="micon"><a class="exi" href="#expand"> </a></td>
790 <a id="Roo.data.Store-method-clearFilter" name=".clearFilter"></a>
791 <div class="fixedFont">
792 <span class="attributes"></span><b class="itemname">clearFilter</b>
794 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>suppressEvent</i></B>)
801 <div class="short">Revert to a view of the Record cache with no filtering applied.</div>
807 Revert to a view of the Record cache with no filtering applied.
814 <dl class="detailList">
815 <dt class="heading">Parameters:</dt>
818 <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>
821 <dd>If true the filter is cleared silently without notifying listeners</dd>
847 <tr class="method-row config-row-alt1 expandable notInherited">
848 <td class="micon"><a class="exi" href="#expand"> </a></td>
852 <a id="Roo.data.Store-method-collect" name=".collect"></a>
853 <div class="fixedFont">
854 <span class="attributes"></span><b class="itemname">collect</b>
856 (<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>)
862 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
871 <div class="short">Collects unique values for a particular dataIndex from this store.</div>
877 Collects unique values for a particular dataIndex from this store.
884 <dl class="detailList">
885 <dt class="heading">Parameters:</dt>
888 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dataIndex</b>
891 <dd>The property to collect</dd>
894 <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>
897 <dd>(optional) Pass true to allow null, undefined or empty string values</dd>
900 <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>
903 <dd>(optional) Pass true to collect from all records, even ones which are filtered</dd>
911 <dl class="detailList">
912 <dt class="heading">Returns:</dt>
914 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> An array of the unique values</dd>
936 <tr class="method-row config-row-alt0 expandable notInherited">
937 <td class="micon"><a class="exi" href="#expand"> </a></td>
941 <a id="Roo.data.Store-method-commitChanges" name=".commitChanges"></a>
942 <div class="fixedFont">
943 <span class="attributes"></span><b class="itemname">commitChanges</b>
952 <div class="short">Commit all Records with outstanding changes.</div>
958 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.
987 <tr class="method-row config-row-alt1 expandable notInherited">
988 <td class="micon"><a class="exi" href="#expand"> </a></td>
992 <a id="Roo.data.Store-method-each" name=".each"></a>
993 <div class="fixedFont">
994 <span class="attributes"></span><b class="itemname">each</b>
996 (<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>)
1003 <div class="short">Calls the specified function for each of the Records in the cache.</div>
1009 Calls the specified function for each of the Records in the cache.
1016 <dl class="detailList">
1017 <dt class="heading">Parameters:</dt>
1020 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
1023 <dd>The function to call. The Record is passed as the first parameter.<br/>Returning <em>false</em> aborts and exits the iteration.</dd>
1026 <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>
1029 <dd>(optional) The scope in which to call the function (defaults to the Record).</dd>
1047 <td class="msource">
1055 <tr class="method-row config-row-alt0 expandable notInherited">
1056 <td class="micon"><a class="exi" href="#expand"> </a></td>
1060 <a id="Roo.data.Store-method-filter" name=".filter"></a>
1061 <div class="fixedFont">
1062 <span class="attributes"></span><b class="itemname">filter</b>
1064 (<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>)
1071 <div class="short">Filter the records by a specified property.</div>
1077 Filter the records by a specified property.
1084 <dl class="detailList">
1085 <dt class="heading">Parameters:</dt>
1088 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>field</b>
1091 <dd>A field on your records</dd>
1094 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp</span> <b>value</b>
1097 <dd>Either a string that the field<br/>should start with or a RegExp to test against the field</dd>
1100 <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>
1103 <dd>True to match any part not just the beginning</dd>
1121 <td class="msource">
1129 <tr class="method-row config-row-alt1 expandable notInherited">
1130 <td class="micon"><a class="exi" href="#expand"> </a></td>
1134 <a id="Roo.data.Store-method-filterBy" name=".filterBy"></a>
1135 <div class="fixedFont">
1136 <span class="attributes"></span><b class="itemname">filterBy</b>
1138 (<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>)
1145 <div class="short">Filter by a function.</div>
1151 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.
1158 <dl class="detailList">
1159 <dt class="heading">Parameters:</dt>
1162 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
1165 <dd>The function to be called, it will receive 2 args (record, id)</dd>
1168 <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>
1171 <dd>(optional) The scope of the function (defaults to this)</dd>
1189 <td class="msource">
1197 <tr class="method-row config-row-alt0 expandable">
1198 <td class="micon"><a class="exi" href="#expand"> </a></td>
1202 <a id="Roo.util.Observable-method-fireEvent" name=".fireEvent"></a>
1203 <div class="fixedFont">
1204 <span class="attributes"></span><b class="itemname">fireEvent</b>
1206 (<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>)
1212 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1221 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
1227 Fires the specified event with the passed parameters (minus the event name).
1234 <dl class="detailList">
1235 <dt class="heading">Parameters:</dt>
1238 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1244 <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>
1247 <dd>Variable number of parameters are passed to handlers</dd>
1255 <dl class="detailList">
1256 <dt class="heading">Returns:</dt>
1258 <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>
1272 <td class="msource">
1274 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1280 <tr class="method-row config-row-alt1 expandable notInherited">
1281 <td class="micon"><a class="exi" href="#expand"> </a></td>
1285 <a id="Roo.data.Store-method-getAt" name=".getAt"></a>
1286 <div class="fixedFont">
1287 <span class="attributes"></span><b class="itemname">getAt</b>
1289 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
1295 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>
1304 <div class="short">Get the Record at the specified index.</div>
1310 Get the Record at the specified index.
1317 <dl class="detailList">
1318 <dt class="heading">Parameters:</dt>
1321 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1324 <dd>The index of the Record to find.</dd>
1332 <dl class="detailList">
1333 <dt class="heading">Returns:</dt>
1335 <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>
1349 <td class="msource">
1357 <tr class="method-row config-row-alt0 expandable notInherited">
1358 <td class="micon"><a class="exi" href="#expand"> </a></td>
1362 <a id="Roo.data.Store-method-getById" name=".getById"></a>
1363 <div class="fixedFont">
1364 <span class="attributes"></span><b class="itemname">getById</b>
1366 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
1372 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>
1381 <div class="short">Get the Record with the specified id.</div>
1387 Get the Record with the specified id.
1394 <dl class="detailList">
1395 <dt class="heading">Parameters:</dt>
1398 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
1401 <dd>The id of the Record to find.</dd>
1409 <dl class="detailList">
1410 <dt class="heading">Returns:</dt>
1412 <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>
1426 <td class="msource">
1434 <tr class="method-row config-row-alt1 expandable notInherited">
1435 <td class="micon"><a class="exi" href="#expand"> </a></td>
1439 <a id="Roo.data.Store-method-getCount" name=".getCount"></a>
1440 <div class="fixedFont">
1441 <span class="attributes"></span><b class="itemname">getCount</b>
1450 <div class="short">Gets the number of cached records.</div>
1456 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>
1477 <td class="msource">
1485 <tr class="method-row config-row-alt0 expandable notInherited">
1486 <td class="micon"><a class="exi" href="#expand"> </a></td>
1490 <a id="Roo.data.Store-method-getModifiedRecords" name=".getModifiedRecords"></a>
1491 <div class="fixedFont">
1492 <span class="attributes"></span><b class="itemname">getModifiedRecords</b>
1500 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]
1509 <div class="short">Gets all records modified since the last commit.</div>
1515 Gets all records modified since the last commit. Modified records are persisted across load operations<br/>(e.g., during paging).
1526 <dl class="detailList">
1527 <dt class="heading">Returns:</dt>
1529 <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>
1543 <td class="msource">
1551 <tr class="method-row config-row-alt1 expandable notInherited">
1552 <td class="micon"><a class="exi" href="#expand"> </a></td>
1556 <a id="Roo.data.Store-method-getRange" name=".getRange"></a>
1557 <div class="fixedFont">
1558 <span class="attributes"></span><b class="itemname">getRange</b>
1560 (<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>)
1566 <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>[]
1575 <div class="short">Returns a range of Records between specified indices.</div>
1581 Returns a range of Records between specified indices.
1588 <dl class="detailList">
1589 <dt class="heading">Parameters:</dt>
1592 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>startIndex</b>
1595 <dd>(optional) The starting index (defaults to 0)</dd>
1598 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>endIndex</b>
1601 <dd>(optional) The ending index (defaults to the last Record in the Store)</dd>
1609 <dl class="detailList">
1610 <dt class="heading">Returns:</dt>
1612 <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>
1626 <td class="msource">
1634 <tr class="method-row config-row-alt0 expandable notInherited">
1635 <td class="micon"><a class="exi" href="#expand"> </a></td>
1639 <a id="Roo.data.Store-method-getSortState" name=".getSortState"></a>
1640 <div class="fixedFont">
1641 <span class="attributes"></span><b class="itemname">getSortState</b>
1650 <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>
1656 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>
1677 <td class="msource">
1685 <tr class="method-row config-row-alt1 expandable notInherited">
1686 <td class="micon"><a class="exi" href="#expand"> </a></td>
1690 <a id="Roo.data.Store-method-getTotalCount" name=".getTotalCount"></a>
1691 <div class="fixedFont">
1692 <span class="attributes"></span><b class="itemname">getTotalCount</b>
1701 <div class="short">Gets the total number of records in the dataset as returned by the server.</div>
1707 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>
1728 <td class="msource">
1736 <tr class="method-row config-row-alt0 expandable">
1737 <td class="micon"><a class="exi" href="#expand"> </a></td>
1741 <a id="Roo.util.Observable-method-hasListener" name=".hasListener"></a>
1742 <div class="fixedFont">
1743 <span class="attributes"></span><b class="itemname">hasListener</b>
1745 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>)
1751 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1760 <div class="short">Checks to see if this object has any listeners for a specified event</div>
1766 Checks to see if this object has any listeners for a specified event
1773 <dl class="detailList">
1774 <dt class="heading">Parameters:</dt>
1777 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1780 <dd>The name of the event to check for</dd>
1788 <dl class="detailList">
1789 <dt class="heading">Returns:</dt>
1791 <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>
1805 <td class="msource">
1807 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1813 <tr class="method-row config-row-alt1 expandable notInherited">
1814 <td class="micon"><a class="exi" href="#expand"> </a></td>
1818 <a id="Roo.data.Store-method-indexOf" name=".indexOf"></a>
1819 <div class="fixedFont">
1820 <span class="attributes"></span><b class="itemname">indexOf</b>
1822 (<a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a> <B><i>record</i></B>)
1828 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1837 <div class="short">Get the index within the cache of the passed Record.</div>
1843 Get the index within the cache of the passed Record.
1850 <dl class="detailList">
1851 <dt class="heading">Parameters:</dt>
1854 <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>
1857 <dd>The Roo.data.Record object to to find.</dd>
1865 <dl class="detailList">
1866 <dt class="heading">Returns:</dt>
1868 <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>
1882 <td class="msource">
1890 <tr class="method-row config-row-alt0 expandable notInherited">
1891 <td class="micon"><a class="exi" href="#expand"> </a></td>
1895 <a id="Roo.data.Store-method-indexOfId" name=".indexOfId"></a>
1896 <div class="fixedFont">
1897 <span class="attributes"></span><b class="itemname">indexOfId</b>
1899 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>id</i></B>)
1905 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1914 <div class="short">Get the index within the cache of the Record with the passed id.</div>
1920 Get the index within the cache of the Record with the passed id.
1927 <dl class="detailList">
1928 <dt class="heading">Parameters:</dt>
1931 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>id</b>
1934 <dd>The id of the Record to find.</dd>
1942 <dl class="detailList">
1943 <dt class="heading">Returns:</dt>
1945 <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>
1959 <td class="msource">
1967 <tr class="method-row config-row-alt1 expandable notInherited">
1968 <td class="micon"><a class="exi" href="#expand"> </a></td>
1972 <a id="Roo.data.Store-method-insert" name=".insert"></a>
1973 <div class="fixedFont">
1974 <span class="attributes"></span><b class="itemname">insert</b>
1976 (<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>)
1983 <div class="short">Inserts Records to the Store at the given index and fires the add event.</div>
1989 Inserts Records to the Store at the given index and fires the add event.
1996 <dl class="detailList">
1997 <dt class="heading">Parameters:</dt>
2000 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
2003 <dd>The start index at which to insert the passed Records.</dd>
2006 <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>
2009 <dd>An Array of Roo.data.Record objects to add to the cache.</dd>
2027 <td class="msource">
2035 <tr class="method-row config-row-alt0 expandable notInherited">
2036 <td class="micon"><a class="exi" href="#expand"> </a></td>
2040 <a id="Roo.data.Store-method-load" name=".load"></a>
2041 <div class="fixedFont">
2042 <span class="attributes"></span><b class="itemname">load</b>
2044 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
2051 <div class="short">Loads the Record cache from the configured Proxy using the configured Reader.</div>
2057 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>
2064 <dl class="detailList">
2065 <dt class="heading">Parameters:</dt>
2068 <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>
2071 <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>
2089 <td class="msource">
2097 <tr class="method-row config-row-alt1 expandable notInherited">
2098 <td class="micon"><a class="exi" href="#expand"> </a></td>
2102 <a id="Roo.data.Store-method-loadData" name=".loadData"></a>
2103 <div class="fixedFont">
2104 <span class="attributes"></span><b class="itemname">loadData</b>
2106 (<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>)
2113 <div class="short">Loads data from a passed data block.</div>
2119 Loads data from a passed data block. A Reader which understands the format of the data<br/>must have been configured in the constructor.
2126 <dl class="detailList">
2127 <dt class="heading">Parameters:</dt>
2130 <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>
2133 <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>
2136 <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>
2139 <dd>(Optional) True to append the new Records rather than replace the existing cache.</dd>
2157 <td class="msource">
2165 <tr class="method-row config-row-alt0 expandable">
2166 <td class="micon"><a class="exi" href="#expand"> </a></td>
2170 <a id="Roo.util.Observable-method-on" name=".on"></a>
2171 <div class="fixedFont">
2172 <span class="attributes"></span><b class="itemname">on</b>
2174 (<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>)
2181 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
2187 Appends an event handler to this element (shorthand for addListener)
2194 <dl class="detailList">
2195 <dt class="heading">Parameters:</dt>
2198 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
2201 <dd>The type of event to listen for</dd>
2204 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
2207 <dd>The method the event invokes</dd>
2210 <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>
2213 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
2216 <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>
2237 <td class="msource">
2239 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2245 <tr class="method-row config-row-alt1 expandable">
2246 <td class="micon"><a class="exi" href="#expand"> </a></td>
2250 <a id="Roo.util.Observable-method-purgeListeners" name=".purgeListeners"></a>
2251 <div class="fixedFont">
2252 <span class="attributes"></span><b class="itemname">purgeListeners</b>
2261 <div class="short">Removes all listeners for this object</div>
2267 Removes all listeners for this object
2288 <td class="msource">
2290 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2296 <tr class="method-row config-row-alt0 expandable notInherited">
2297 <td class="micon"><a class="exi" href="#expand"> </a></td>
2301 <a id="Roo.data.Store-method-query" name=".query"></a>
2302 <div class="fixedFont">
2303 <span class="attributes"></span><b class="itemname">query</b>
2305 (<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>)
2320 <div class="short">Query the records by a specified property.</div>
2326 Query the records by a specified property.
2333 <dl class="detailList">
2334 <dt class="heading">Parameters:</dt>
2337 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>field</b>
2340 <dd>A field on your records</dd>
2343 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/RegExp</span> <b>value</b>
2346 <dd>Either a string that the field<br/>should start with or a RegExp to test against the field</dd>
2349 <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>
2352 <dd>True to match any part not just the beginning</dd>
2360 <dl class="detailList">
2361 <dt class="heading">Returns:</dt>
2363 <dd><span class="fixedFont">MixedCollection</span> Returns an Roo.util.MixedCollection of the matched records</dd>
2377 <td class="msource">
2385 <tr class="method-row config-row-alt1 expandable notInherited">
2386 <td class="micon"><a class="exi" href="#expand"> </a></td>
2390 <a id="Roo.data.Store-method-queryBy" name=".queryBy"></a>
2391 <div class="fixedFont">
2392 <span class="attributes"></span><b class="itemname">queryBy</b>
2394 (<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>)
2409 <div class="short">Query by a function.</div>
2415 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.
2422 <dl class="detailList">
2423 <dt class="heading">Parameters:</dt>
2426 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fn</b>
2429 <dd>The function to be called, it will receive 2 args (record, id)</dd>
2432 <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>
2435 <dd>(optional) The scope of the function (defaults to this)</dd>
2443 <dl class="detailList">
2444 <dt class="heading">Returns:</dt>
2446 <dd><span class="fixedFont">MixedCollection</span> Returns an Roo.util.MixedCollection of the matched records</dd>
2460 <td class="msource">
2468 <tr class="method-row config-row-alt0 expandable notInherited">
2469 <td class="micon"><a class="exi" href="#expand"> </a></td>
2473 <a id="Roo.data.Store-method-rejectChanges" name=".rejectChanges"></a>
2474 <div class="fixedFont">
2475 <span class="attributes"></span><b class="itemname">rejectChanges</b>
2484 <div class="short">Cancel outstanding changes on all changed records.</div>
2490 Cancel outstanding changes on all changed records.
2511 <td class="msource">
2519 <tr class="method-row config-row-alt1 expandable notInherited">
2520 <td class="micon"><a class="exi" href="#expand"> </a></td>
2524 <a id="Roo.data.Store-method-reload" name=".reload"></a>
2525 <div class="fixedFont">
2526 <span class="attributes"></span><b class="itemname">reload</b>
2528 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
2535 <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>
2541 Reloads the Record cache from the configured Proxy using the configured Reader and<br/>the options from the last load operation performed.
2548 <dl class="detailList">
2549 <dt class="heading">Parameters:</dt>
2552 <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>
2555 <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>
2573 <td class="msource">
2581 <tr class="method-row config-row-alt0 expandable notInherited">
2582 <td class="micon"><a class="exi" href="#expand"> </a></td>
2586 <a id="Roo.data.Store-method-remove" name=".remove"></a>
2587 <div class="fixedFont">
2588 <span class="attributes"></span><b class="itemname">remove</b>
2590 (Ext.data.Record <B><i>record</i></B>)
2597 <div class="short">Remove a Record from the Store and fires the remove event.</div>
2603 Remove a Record from the Store and fires the remove event.
2610 <dl class="detailList">
2611 <dt class="heading">Parameters:</dt>
2614 <span class="fixedFont">Ext.data.Record</span> <b>record</b>
2617 <dd>The Roo.data.Record object to remove from the cache.</dd>
2635 <td class="msource">
2643 <tr class="method-row config-row-alt1 expandable notInherited">
2644 <td class="micon"><a class="exi" href="#expand"> </a></td>
2648 <a id="Roo.data.Store-method-removeAll" name=".removeAll"></a>
2649 <div class="fixedFont">
2650 <span class="attributes"></span><b class="itemname">removeAll</b>
2659 <div class="short">Remove all Records from the Store and fires the clear event.</div>
2665 Remove all Records from the Store and fires the clear event.
2686 <td class="msource">
2694 <tr class="method-row config-row-alt0 expandable">
2695 <td class="micon"><a class="exi" href="#expand"> </a></td>
2699 <a id="Roo.util.Observable-method-removeListener" name=".removeListener"></a>
2700 <div class="fixedFont">
2701 <span class="attributes"></span><b class="itemname">removeListener</b>
2703 (<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>)
2710 <div class="short">Removes a listener</div>
2723 <dl class="detailList">
2724 <dt class="heading">Parameters:</dt>
2727 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
2730 <dd>The type of event to listen for</dd>
2733 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
2736 <dd>The handler to remove</dd>
2739 <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>
2742 <dd>(optional) The scope (this object) for the handler</dd>
2760 <td class="msource">
2762 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
2768 <tr class="method-row config-row-alt1 expandable notInherited">
2769 <td class="micon"><a class="exi" href="#expand"> </a></td>
2773 <a id="Roo.data.Store-method-setDefaultSort" name=".setDefaultSort"></a>
2774 <div class="fixedFont">
2775 <span class="attributes"></span><b class="itemname">setDefaultSort</b>
2777 (<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>)
2784 <div class="short">Sets the default sort column and order to be used by the next load operation.</div>
2790 Sets the default sort column and order to be used by the next load operation.
2797 <dl class="detailList">
2798 <dt class="heading">Parameters:</dt>
2801 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>fieldName</b>
2804 <dd>The name of the field to sort by.</dd>
2807 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dir</b>
2810 <dd>(optional) The sort order, "ASC" or "DESC" (defaults to "ASC")</dd>
2828 <td class="msource">
2836 <tr class="method-row config-row-alt0 expandable notInherited">
2837 <td class="micon"><a class="exi" href="#expand"> </a></td>
2841 <a id="Roo.data.Store-method-sort" name=".sort"></a>
2842 <div class="fixedFont">
2843 <span class="attributes"></span><b class="itemname">sort</b>
2845 (<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>)
2852 <div class="short">Sort the Records.</div>
2858 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.
2865 <dl class="detailList">
2866 <dt class="heading">Parameters:</dt>
2869 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>fieldName</b>
2872 <dd>The name of the field to sort by.</dd>
2875 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>dir</b>
2878 <dd>(optional) The sort order, "ASC" or "DESC" (defaults to "ASC")</dd>
2896 <td class="msource">
2904 <tr class="method-row config-row-alt1 expandable notInherited">
2905 <td class="micon"><a class="exi" href="#expand"> </a></td>
2909 <a id="Roo.data.Store-method-sum" name=".sum"></a>
2910 <div class="fixedFont">
2911 <span class="attributes"></span><b class="itemname">sum</b>
2913 (<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>)
2919 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
2928 <div class="short">Sums the value of <i>property</i> for each record between start and end and returns the result.</div>
2934 Sums the value of <i>property</i> for each record between start and end and returns the result.
2941 <dl class="detailList">
2942 <dt class="heading">Parameters:</dt>
2945 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>property</b>
2948 <dd>A field on your records</dd>
2951 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>start</b>
2954 <dd>The record index to start at (defaults to 0)</dd>
2957 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>end</b>
2960 <dd>The last record index to include (defaults to length - 1)</dd>
2968 <dl class="detailList">
2969 <dt class="heading">Returns:</dt>
2971 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The sum</dd>
2985 <td class="msource">
2993 <tr class="method-row config-row-alt0 expandable">
2994 <td class="micon"><a class="exi" href="#expand"> </a></td>
2998 <a id="Roo.util.Observable-method-un" name=".un"></a>
2999 <div class="fixedFont">
3000 <span class="attributes"></span><b class="itemname">un</b>
3002 (<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>)
3009 <div class="short">Removes a listener (shorthand for removeListener)</div>
3015 Removes a listener (shorthand for removeListener)
3022 <dl class="detailList">
3023 <dt class="heading">Parameters:</dt>
3026 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
3029 <dd>The type of event to listen for</dd>
3032 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
3035 <dd>The handler to remove</dd>
3038 <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>
3041 <dd>(optional) The scope (this object) for the handler</dd>
3059 <td class="msource">
3061 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
3070 <!-- ============================== events summary / details ======================== -->
3073 <a id="Roo.data.Store-events"></a>
3082 <table cellspacing="0" class="member-table">
3083 <caption>Events</caption>
3086 <th class="sig-header" colspan="2">Event</th>
3087 <th class="msource-header">Defined By</th>
3096 <tr class="method-row expandable config-row-alt0 notInherited">
3097 <td class="micon"><a class="exi" href="#expand"> </a></td>
3100 <a id="Roo.data.Store-event-*add"></a>
3102 <div class="fixedFont">
3103 <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>)
3109 <div class="short">Fires when Records have been added to the Store
3115 Fires when Records have been added to the Store
3121 <dl class="detailList">
3122 <dt class="heading">Parameters:</dt>
3125 <span class="fixedFont">Store</span> <b>this</b>
3131 <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>
3134 <dd>The array of Records added</dd>
3137 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
3140 <dd>The index at which the record(s) were added</dd>
3158 <td class="msource">
3163 <tr class="method-row expandable config-row-alt1 notInherited">
3164 <td class="micon"><a class="exi" href="#expand"> </a></td>
3167 <a id="Roo.data.Store-event-*beforeload"></a>
3169 <div class="fixedFont">
3170 <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>)
3176 <div class="short">Fires before a request is made for a new data object.
3182 Fires before a request is made for a new data object. If the beforeload handler returns false<br/>the load action will be canceled.
3188 <dl class="detailList">
3189 <dt class="heading">Parameters:</dt>
3192 <span class="fixedFont">Store</span> <b>this</b>
3198 <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>
3201 <dd>The loading options that were specified (see {<b>link</b> <b>load</b>} for details)</dd>
3219 <td class="msource">
3224 <tr class="method-row expandable config-row-alt0 notInherited">
3225 <td class="micon"><a class="exi" href="#expand"> </a></td>
3228 <a id="Roo.data.Store-event-*beforeloadadd"></a>
3230 <div class="fixedFont">
3231 <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>)
3237 <div class="short">Fires after a new set of Records has been loaded.
3243 Fires after a new set of Records has been loaded.
3249 <dl class="detailList">
3250 <dt class="heading">Parameters:</dt>
3253 <span class="fixedFont">Store</span> <b>this</b>
3259 <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>
3262 <dd>The Records that were loaded</dd>
3265 <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>
3268 <dd>The loading options that were specified (see {<b>link</b> <b>load</b>} for details)</dd>
3286 <td class="msource">
3291 <tr class="method-row expandable config-row-alt1 notInherited">
3292 <td class="micon"><a class="exi" href="#expand"> </a></td>
3295 <a id="Roo.data.Store-event-*clear"></a>
3297 <div class="fixedFont">
3298 <b class="itemname">clear</b> (Store <B><i>this</i></B>)
3304 <div class="short">Fires when the data cache has been cleared.
3310 Fires when the data cache has been cleared.
3316 <dl class="detailList">
3317 <dt class="heading">Parameters:</dt>
3320 <span class="fixedFont">Store</span> <b>this</b>
3341 <td class="msource">
3346 <tr class="method-row expandable config-row-alt0 notInherited">
3347 <td class="micon"><a class="exi" href="#expand"> </a></td>
3350 <a id="Roo.data.Store-event-*datachanged"></a>
3352 <div class="fixedFont">
3353 <b class="itemname">datachanged</b> (Store <B><i>this</i></B>)
3359 <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.
3365 Fires when the data cache has changed, and a widget which is using this Store<br/>as a Record cache should refresh its view.
3371 <dl class="detailList">
3372 <dt class="heading">Parameters:</dt>
3375 <span class="fixedFont">Store</span> <b>this</b>
3396 <td class="msource">
3401 <tr class="method-row expandable config-row-alt1 notInherited">
3402 <td class="micon"><a class="exi" href="#expand"> </a></td>
3405 <a id="Roo.data.Store-event-*load"></a>
3407 <div class="fixedFont">
3408 <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>)
3414 <div class="short">Fires after a new set of Records has been loaded, before they are added to the store.
3420 Fires after a new set of Records has been loaded, before they are added to the store.
3426 <dl class="detailList">
3427 <dt class="heading">Parameters:</dt>
3430 <span class="fixedFont">Store</span> <b>this</b>
3436 <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>
3439 <dd>The Records that were loaded</dd>
3442 <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>
3445 <dd>The loading options that were specified (see {<b>link</b> <b>load</b>} for details)</dd>
3463 <td class="msource">
3468 <tr class="method-row expandable config-row-alt0 notInherited">
3469 <td class="micon"><a class="exi" href="#expand"> </a></td>
3472 <a id="Roo.data.Store-event-*loadexception"></a>
3474 <div class="fixedFont">
3475 <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>)
3481 <div class="short">Fires if an exception occurs in the Proxy during loading.
3487 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
3493 <dl class="detailList">
3494 <dt class="heading">Parameters:</dt>
3497 <span class="fixedFont">Proxy</span> <b></b>
3503 <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>
3506 <dd>from JsonData.reader() - success, totalRecords, records</dd>
3509 <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>
3515 <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>
3518 <dd>from your request (normally this contains the Exception)</dd>
3536 <td class="msource">
3541 <tr class="method-row expandable config-row-alt1 notInherited">
3542 <td class="micon"><a class="exi" href="#expand"> </a></td>
3545 <a id="Roo.data.Store-event-*metachange"></a>
3547 <div class="fixedFont">
3548 <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>)
3554 <div class="short">Fires when this store's reader provides new metadata (fields).
3560 Fires when this store's reader provides new metadata (fields). This is currently only support for JsonReaders.
3566 <dl class="detailList">
3567 <dt class="heading">Parameters:</dt>
3570 <span class="fixedFont">Store</span> <b>this</b>
3576 <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>
3579 <dd>The JSON metadata</dd>
3597 <td class="msource">
3602 <tr class="method-row expandable config-row-alt0 notInherited">
3603 <td class="micon"><a class="exi" href="#expand"> </a></td>
3606 <a id="Roo.data.Store-event-*remove"></a>
3608 <div class="fixedFont">
3609 <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>)
3615 <div class="short">Fires when a Record has been removed from the Store
3621 Fires when a Record has been removed from the Store
3627 <dl class="detailList">
3628 <dt class="heading">Parameters:</dt>
3631 <span class="fixedFont">Store</span> <b>this</b>
3637 <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>
3640 <dd>The Record that was removed</dd>
3643 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
3646 <dd>The index at which the record was removed</dd>
3664 <td class="msource">
3669 <tr class="method-row expandable config-row-alt1 notInherited">
3670 <td class="micon"><a class="exi" href="#expand"> </a></td>
3673 <a id="Roo.data.Store-event-*update"></a>
3675 <div class="fixedFont">
3676 <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>)
3682 <div class="short">Fires when a Record has been updated
3688 Fires when a Record has been updated
3694 <dl class="detailList">
3695 <dt class="heading">Parameters:</dt>
3698 <span class="fixedFont">Store</span> <b>this</b>
3704 <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>
3707 <dd>The Record that was updated</dd>
3710 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>operation</b>
3713 <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>
3731 <td class="msource">
3743 <!-- ============================== footer ================================= -->
3744 <div class="fineprint" style="clear:both">
3746 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 13 2018 14:10:54 GMT+0800 (HKT)
3748 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>