X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..6e39d509471fe9b4e2660e0d1631b350d0c66f40:/docs/source/JsonReader.html diff --git a/docs/source/JsonReader.html b/docs/source/JsonReader.html index 097b4a11..e6c1b52c 100644 --- a/docs/source/JsonReader.html +++ b/docs/source/JsonReader.html @@ -1,17 +1,12 @@ - - - The source code - - - - -
/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-
/** + + + + The source code + + + + +
/** * @class Ext.data.JsonReader * @extends Ext.data.DataReader *

Data reader class to create an Array of {@link Ext.data.Record} objects @@ -200,7 +195,7 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, { var res = new Ext.data.Response({ action: action, success: this.getSuccess(o), - data: this.extractData(root), + data: (root) ? this.extractData(root, false) : [], message: this.getMessage(o), raw: o }); @@ -316,40 +311,6 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, { }; }(), - /** - * returns extracted, type-cast rows of data. Iterates to call #extractValues for each row - * @param {Object[]/Object} data-root from server response - * @param {Boolean} returnRecords [false] Set true to return instances of Ext.data.Record - * @private - */ - extractData : function(root, returnRecords) { - var rs = undefined; - if (this.isData(root)) { - root = [root]; - } - if (Ext.isArray(root)) { - var f = this.recordType.prototype.fields, - fi = f.items, - fl = f.length, - rs = []; - if (returnRecords === true) { - var Record = this.recordType; - for (var i = 0; i < root.length; i++) { - var n = root[i]; - var record = new Record(this.extractValues(n, fi, fl), this.getId(n)); - record.json = n; - rs.push(record); - } - } - else { - for (var i = 0; i < root.length; i++) { - rs.push(this.extractValues(root[i], fi, fl)); - } - } - } - return rs; - }, - /** * type-casts a single row of raw-data from server * @param {Object} data @@ -388,6 +349,6 @@ Ext.apply(Ext.data.JsonReader.Error.prototype, { 'root-empty': 'Data was expected to be returned by the server in the "root" property of the response. Please review your JsonReader configuration to ensure the "root" property matches that returned in the server-response. See JsonReader docs.' } }); -

- +
+ \ No newline at end of file