Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / source / ResultSet.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5   <title>The source code</title>
6   <link href="../prettify/prettify.css" type="text/css" rel="stylesheet" />
7   <script type="text/javascript" src="../prettify/prettify.js"></script>
8   <style type="text/css">
9     .highlight { display: block; background-color: #ddd; }
10   </style>
11   <script type="text/javascript">
12     function highlight() {
13       document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
14     }
15   </script>
16 </head>
17 <body onload="prettyPrint(); highlight();">
18   <pre class="prettyprint lang-js"><span id='Ext-data-ResultSet'>/**
19 </span> * @author Ed Spencer
20  * @class Ext.data.ResultSet
21  * @extends Object
22  * 
23  * &lt;p&gt;Simple wrapper class that represents a set of records returned by a Proxy.&lt;/p&gt;
24  */
25 Ext.define('Ext.data.ResultSet', {
26 <span id='Ext-data-ResultSet-cfg-loaded'>    /**
27 </span>     * @cfg {Boolean} loaded
28      * True if the records have already been loaded. This is only meaningful when dealing with
29      * SQL-backed proxies
30      */
31     loaded: true,
32     
33 <span id='Ext-data-ResultSet-cfg-count'>    /**
34 </span>     * @cfg {Number} count
35      * The number of records in this ResultSet. Note that total may differ from this number
36      */
37     count: 0,
38     
39 <span id='Ext-data-ResultSet-cfg-total'>    /**
40 </span>     * @cfg {Number} total
41      * The total number of records reported by the data source. This ResultSet may form a subset of
42      * those records (see count)
43      */
44     total: 0,
45     
46 <span id='Ext-data-ResultSet-cfg-success'>    /**
47 </span>     * @cfg {Boolean} success
48      * True if the ResultSet loaded successfully, false if any errors were encountered
49      */
50     success: false,
51     
52 <span id='Ext-data-ResultSet-cfg-records'>    /**
53 </span>     * @cfg {Array} records The array of record instances. Required
54      */
55
56 <span id='Ext-data-ResultSet-method-constructor'>    /**
57 </span>     * Creates the resultSet
58      * @param {Object} config (optional) Config object.
59      */
60     constructor: function(config) {
61         Ext.apply(this, config);
62         
63 <span id='Ext-data-ResultSet-property-totalRecords'>        /**
64 </span>         * DEPRECATED - will be removed in Ext JS 5.0. This is just a copy of this.total - use that instead
65          * @property totalRecords
66          * @type Mixed
67          */
68         this.totalRecords = this.total;
69         
70         if (config.count === undefined) {
71             this.count = this.records.length;
72         }
73     }
74 });</pre>
75 </body>
76 </html>