Roo.data.DataReader
Roo.data.ArrayReader 

		   

Class Roo.data.ArrayReader

Package:Roo.data
Defined In: Roo/data/ArrayReader.js.
Class:ArrayReader
Extends: Roo.data.DataReader
Data reader class to create an Array of Roo.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 RecordDef = Roo.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 Roo.data.ArrayReader({
id: 0 // The subscript within row Array that provides an ID for the Record (optional)
}, RecordDef);


This would consume an Array like this:


[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]
Class Comments / Notes => [Add Your comment/notes about this class]
Config Options (Usually are also Properties)
Options Defined By
Public Properties - Has None
Public Methods
Method Defined By
Events - Has None
Documentation generated by Introspection Doc Generator on Fri Jul 13 2018 14:10:54 GMT+0800 (HKT) Based on JsDoc Toolkit