Partial Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs2 / 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" : true,
9   "isBuiltin" : false,
10   "config" : [
11     {
12       "name" : "fields",
13       "type" : "Array",
14       "desc" : "Array of field definition objects",
15       "memberOf" : "Roo.data.ArrayReader",
16       "values" : [
17       ]
18     },
19     {
20       "name" : "id",
21       "type" : "String",
22       "desc" : "(optional) The subscript within row Array that provides an ID for the Record",
23       "memberOf" : "Roo.data.ArrayReader",
24       "values" : [
25       ]
26     }
27   ],
28   "methods" : [
29     {
30       "name" : "readRecords",
31       "desc" : "Create a data block containing Roo.data.Records from an XML document.",
32       "isStatic" : false,
33       "isConstructor" : false,
34       "isPrivate" : false,
35       "memberOf" : "Roo.data.ArrayReader",
36       "example" : "",
37       "deprecated" : "",
38       "since" : "",
39       "see" : "",
40       "params" : [
41         {
42           "name" : "o",
43           "type" : "Object",
44           "desc" : "An Array of row objects which represents the dataset.",
45           "isOptional" : false
46         }
47       ],
48       "returns" : [
49         {
50           "name" : "",
51           "type" : "Object",
52           "desc" : "data A data block which is used by an Roo.data.Store object as\na cache of Roo.data.Records."
53         }
54       ]
55     },
56     {
57       "name" : "newRow",
58       "desc" : "Create an empty record",
59       "isStatic" : false,
60       "isConstructor" : false,
61       "isPrivate" : false,
62       "memberOf" : "Roo.data.DataReader",
63       "example" : "",
64       "deprecated" : "",
65       "since" : "",
66       "see" : "",
67       "params" : [
68         {
69           "name" : "data",
70           "type" : "Object",
71           "desc" : "(optional) - overlay some values",
72           "isOptional" : false
73         }
74       ],
75       "returns" : [
76         {
77           "name" : "",
78           "type" : "Roo.data.Record",
79           "desc" : "record created."
80         }
81       ]
82     }
83   ],
84   "events" : [
85   ]
86 }