Properties Methods Events Config Options Direct Link
Reader
  JsonReader
    ArrayReader

Class Ext.data.ArrayReader

Package:Ext.data
Defined In:ArrayReader.js
Class:ArrayReader
Extends:JsonReader

Data reader class to create an Array of Ext.data.Record objects from an Array. Each element of that Array represents a row of data fields. The fields are pulled into a Record object using as a subscript, the mapping property of the field definition if it exists, or the field's ordinal position in the definition.

Example code:

var Employee = Ext.data.Record.create([
    {name: 'name', mapping: 1},         // "mapping" only needed if an "id" field is present which
    {name: 'occupation', mapping: 2}    // precludes using the ordinal position as the index.
]);
var myReader = new Ext.data.ArrayReader({
    idIndex: 0
}, Employee);

This would consume an Array like this:

[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]

Config Options

Config OptionsDefined By
 idProperty : String
Name of the property within a row object that contains a record identifier value. Defaults to id
Reader

Public Properties

PropertyDefined By
 jsonData : Mixed
DEPRECATED - will be removed in Ext JS 5.0. This is just a copy of this.rawData - use that instead
JsonReader
 rawData : Mixed
The raw data object that was last passed to readRecords. Stored for further processing if needed
Reader

Public Methods

MethodDefined By

Public Events

This class has no public events.