DataReader ArrayReader
Package: | Ext.data |
Defined In: | ArrayReader.js |
Class: | ArrayReader |
Extends: | DataReader |
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({
id: 0 // The subscript within row Array that provides an ID for the Record (optional)
}, Employee);
This would consume an Array like this:
[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]
Config Options | Defined By | |
---|---|---|
id : String
(optional) The subscript within row Array that provides an ID for the Record
|
ArrayReader |
Property | Defined By | |
---|---|---|
meta : Mixed
This DataReader's configured metadata as passed to the constructor.
|
DataReader |
Method | Defined By | |
---|---|---|
ArrayReader( Object meta , Object recordType ) Create a new ArrayReader
Create a new ArrayReader
Parameters:
|
ArrayReader | |
readRecords( Object o ) : Object Create a data block containing Ext.data.Records from an XML document.
Create a data block containing Ext.data.Records from an XML document.
Parameters:
|
ArrayReader |