X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..05ce1c11e98b33f14ddee184493bd5a60dc947e2:/docs/source/ArrayReader.html diff --git a/docs/source/ArrayReader.html b/docs/source/ArrayReader.html index 16adff96..def831ea 100644 --- a/docs/source/ArrayReader.html +++ b/docs/source/ArrayReader.html @@ -1,11 +1,17 @@ - -
-/** + + ++ \ No newline at end of fileThe source code + + + + +/*! + * Ext JS Library 3.0.3 + * Copyright(c) 2006-2009 Ext JS, LLC + * licensing@extjs.com + * http://www.extjs.com/license + */ +/** * @class Ext.data.ArrayReader * @extends Ext.data.JsonReader *- +});Data reader class to create an Array of {@link Ext.data.Record} objects from an Array. @@ -70,13 +76,13 @@ Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, { var root = this.getRoot(o); - for(var i = 0; i < root.length; i++) { - var n = root[i]; - var values = {}; - var id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null); + for(var i = 0, len = root.length; i < len; i++) { + var n = root[i], + values = {}, + id = ((sid || sid === 0) && n[sid] !== undefined && n[sid] !== "" ? n[sid] : null); for(var j = 0, jlen = fields.length; j < jlen; j++) { - var f = fields.items[j]; - var k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j; + var f = fields.items[j], + k = f.mapping !== undefined && f.mapping !== null ? f.mapping : j; v = n[k] !== undefined ? n[k] : f.defaultValue; v = f.convert(v, n); values[f.name] = v; @@ -100,6 +106,6 @@ Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, { totalRecords : totalRecords }; } -});