4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-data-ResultSet'>/**
19 </span> * @author Ed Spencer
21 * Simple wrapper class that represents a set of records returned by a Proxy.
23 Ext.define('Ext.data.ResultSet', {
24 <span id='Ext-data-ResultSet-cfg-loaded'> /**
25 </span> * @cfg {Boolean} loaded
26 * True if the records have already been loaded. This is only meaningful when dealing with
31 <span id='Ext-data-ResultSet-cfg-count'> /**
32 </span> * @cfg {Number} count
33 * The number of records in this ResultSet. Note that total may differ from this number.
37 <span id='Ext-data-ResultSet-cfg-total'> /**
38 </span> * @cfg {Number} total
39 * The total number of records reported by the data source. This ResultSet may form a subset of
40 * those records (see {@link #count}).
44 <span id='Ext-data-ResultSet-cfg-success'> /**
45 </span> * @cfg {Boolean} success
46 * True if the ResultSet loaded successfully, false if any errors were encountered.
50 <span id='Ext-data-ResultSet-cfg-records'> /**
51 </span> * @cfg {Ext.data.Model[]} records (required)
52 * The array of record instances.
55 <span id='Ext-data-ResultSet-method-constructor'> /**
56 </span> * Creates the resultSet
57 * @param {Object} [config] Config object.
59 constructor: function(config) {
60 Ext.apply(this, config);
62 <span id='Ext-data-ResultSet-property-totalRecords'> /**
63 </span> * @property {Number} totalRecords
65 * @deprecated Will be removed in Ext JS 5.0. Use {@link #total} instead.
67 this.totalRecords = this.total;
69 if (config.count === undefined) {
70 this.count = this.records.length;