Roo.data.DataReader Roo.data.ArrayReader
Package: | Roo.data |
Defined In: | Roo/data/ArrayReader.js. |
Class: | ArrayReader |
Extends: | Roo.data.DataReader |
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'] ]
Options | Defined By | |
---|---|---|
id : String
(optional) The subscript within row Array that provides an ID for the Record
(optional) The subscript within row Array that provides an ID for the Record
|
Roo.data.ArrayReader |
Method | Defined By | |
---|---|---|
Create a new Roo.data.ArrayReader
|
||
newRow
(Object data)
:
Roo.data.Record
Create an empty record
Create an empty record
|
Roo.data.DataReader | |
Create a data block containing Roo.data.Records from an XML document.
|
Roo.data.ArrayReader |