/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Ext_data_ArrayReader({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.data.JsonReader","uses":[],"html":"
Hierarchy
Ext.data.DataReaderExt.data.JsonReaderExt.data.ArrayReaderFiles
Data reader class to create an Array of Ext.data.Record objects from an Array.\nEach element of that Array represents a row of data fields. The\nfields are pulled into a Record object using as a subscript, the mapping
property\nof the field definition if it exists, or the field's ordinal position in the definition.
Example code:
\n\n\nvar Employee = Ext.data.Record.create([\n {name: 'name', mapping: 1}, // \"mapping\" only needed if an \"id\" field is present which\n {name: 'occupation', mapping: 2} // precludes using the ordinal position as the index.\n]);\nvar myReader = new Ext.data.ArrayReader({\n idIndex: 0\n}, Employee);\n
\n\n\nThis would consume an Array like this:
\n\n\n[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]\n
\n\nEither an Array of Field definition objects (which\nwill be passed to Ext.data.Record.create, or a Record\nconstructor created from Ext.data.Record.create.
\n\n(optional) The subscript within row Array that provides an ID for the Record.\nDeprecated. Use idIndex instead.
\n(optional) The subscript within row Array that provides an ID for the Record.
\n(optional) The subscript within row Array that provides an ID for the Record.
\n[id] Name of the property within a row object\nthat contains a record identifier value. Defaults to id
\n[undefined] Optional name of a property within a server-response that represents a user-feedback message.
\n[undefined] Optional name of a property within a server-response that represents a user-feedback message.
\n[undefined] Required. The name of the property\nwhich contains the Array of row objects. Defaults to undefined.\nAn exception will be thrown if the root property is undefined. The data\npacket value for this property should be an empty array to clear the data\nor show no data.
\n[total] Name of the property from which to\nretrieve the total number of records in the dataset. This is only needed\nif the whole dataset is not passed in one go, but is being paged from\nthe remote server. Defaults to total.
\nAfter any data loads, the raw JSON data is available for further custom processing. If no data is\nloaded or there is a load exception this property will be undefined.
\nThis JsonReader's metadata as passed to the constructor, or as passed in\nthe last data packet's metaData property.
\nThis JsonReader's metadata as passed to the constructor, or as passed in\nthe last data packet's metaData property.
\nOverrides: Ext.data.DataReader.meta
Create a new ArrayReader
\nMetadata configuration options.
\nEither an Array of Field definition objects (which\nwill be passed to Ext.data.Record.create, or a Record\nconstructor created from Ext.data.Record.create.
\n\nOverrides: Ext.data.JsonReader.constructor
Abstract method, overridden in DataReader extensions such as Ext.data.JsonReader and Ext.data.XmlReader
\nreturns extracted, type-cast rows of data. Iterates to call extractValues for each row
\nfrom server response
\n[false] Set true to return instances of Ext.data.Record
\ntype-casts a single row of raw-data from server
\nOverrides: Ext.data.DataReader.extractValues
Abstract method created in extension's buildExtractors impl.
\nAbstract method created in extension's buildExtractors impl.
\nAbstract method created in extension's buildExtractors impl.
\nAbstract method created in extension's buildExtractors impl.
\nAbstract method created in extension's buildExtractors impl.
\nReturns true if the supplied data-hash looks and quacks like data. Checks to see if it has a key\ncorresponding to idProperty defined in your DataReader config containing non-empty pk.
\nThis method is only used by a DataProxy which has retrieved data from a remote server.
\nThe XHR object which contains the JSON data in its responseText.
\ndata A data block which is used by an Ext.data.Store object as\na cache of Ext.data.Records.
\nCreate a data block containing Ext.data.Records from an Array.
\nAn Array of row objects which represents the dataset.
\ndata A data block which is used by an Ext.data.Store object as\na cache of Ext.data.Records.
\nOverrides: Ext.data.JsonReader.readRecords
Used for un-phantoming a record after a successful database insert. Sets the records pk along with new data from server.\nYou must return at least the database pk using the idProperty defined in your DataReader configuration. The incoming\ndata from server will be merged with the data in the local record.\nIn addition, you must return record-data from the server in the same order received.\nWill perform a commit as well, un-marking dirty-fields. Store's \"update\" event will be suppressed.
\nThe phantom record to be realized.
\nThe new record data to apply. Must include the primary-key from database defined in idProperty field.
\nUsed for updating a non-phantom or \"real\" record's data with fresh data from server after remote-save.\nIf returning data from multiple-records after a batch-update, you must return record-data from the server in\nthe same order received. Will perform a commit as well, un-marking dirty-fields. Store's \"update\" event will be\nsuppressed as the record receives fresh new data-hash
\n