enable grammerly in editor
[roojs1] / docs / symbols / Roo.data.ArrayReader.json
1 {
2   "name" : "Roo.data.ArrayReader",
3   "augments" : [
4     "Roo.data.DataReader"
5   ],
6   "desc" : "Data reader class to create an Array of Roo.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 <em>mapping</em> property\nof the field definition if it exists, or the field's ordinal position in the definition.<br>\n<p>\nExample code:.\n<pre><code>\nvar RecordDef = Roo.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 Roo.data.ArrayReader({\n    id: 0                     // The subscript within row Array that provides an ID for the Record (optional)\n}, RecordDef);\n</code></pre>\n<p>\nThis would consume an Array like this:\n<pre><code>\n[ [1, 'Bill', 'Gardener'], [2, 'Ben', 'Horticulturalist'] ]\n  </code></pre>",
7   "isSingleton" : false,
8   "isStatic" : false,
9   "isBuiltin" : false,
10   "memberOf" : "ArrayReader",
11   "example" : "",
12   "deprecated" : "",
13   "since" : "",
14   "see" : "",
15   "params" : [
16     {
17       "name" : "meta",
18       "type" : "Object",
19       "desc" : "Metadata configuration options.",
20       "isOptional" : false
21     },
22     {
23       "name" : "recordType",
24       "type" : "Object|Array",
25       "desc" : "Either an Array of field definition objects",
26       "isOptional" : false
27     }
28   ],
29   "returns" : [],
30   "config" : [
31     {
32       "name" : "id",
33       "type" : "String",
34       "desc" : "Name of the property within a row object that contains a record identifier value.\nas specified to {@link Roo.data.Record#create},\nor an {@link Roo.data.Record} object\n\n\ncreated using {@link Roo.data.Record#create}.",
35       "memberOf" : "Roo.data.ArrayReader",
36       "optvals" : []
37     },
38     {
39       "name" : "fields",
40       "type" : "Array",
41       "desc" : "Array of field definition objects",
42       "memberOf" : "Roo.data.ArrayReader",
43       "optvals" : []
44     }
45   ],
46   "methods" : [
47     {
48       "name" : "readRecords",
49       "desc" : "Create a data block containing Roo.data.Records from an XML document.",
50       "isStatic" : false,
51       "isConstructor" : false,
52       "isPrivate" : false,
53       "memberOf" : "Roo.data.ArrayReader",
54       "example" : "",
55       "deprecated" : "",
56       "since" : "",
57       "see" : "",
58       "params" : [
59         {
60           "name" : "o",
61           "type" : "Object",
62           "desc" : "An Array of row objects which represents the dataset.",
63           "isOptional" : false
64         }
65       ],
66       "returns" : [
67         {
68           "name" : "",
69           "type" : "Object",
70           "desc" : "A data block which is used by an {@link Roo.data.Store} object as\na cache of Roo.data.Records."
71         }
72       ]
73     },
74     {
75       "name" : "newRow",
76       "desc" : "Create an empty record",
77       "isStatic" : false,
78       "isConstructor" : false,
79       "isPrivate" : false,
80       "memberOf" : "Roo.data.DataReader",
81       "example" : "",
82       "deprecated" : "",
83       "since" : "",
84       "see" : "",
85       "params" : [
86         {
87           "name" : "data",
88           "type" : "Object",
89           "desc" : "(optional) - overlay some values",
90           "isOptional" : false
91         }
92       ],
93       "returns" : [
94         {
95           "name" : "",
96           "type" : "Roo.data.Record",
97           "desc" : "record created."
98         }
99       ]
100     }
101   ],
102   "events" : []
103 }