docs/src/Roo_bootstrap_Card.js.html
[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   ],
31   "config" : [
32     {
33       "name" : "id",
34       "type" : "String",
35       "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}.",
36       "memberOf" : "Roo.data.ArrayReader",
37       "optvals" : [
38       ]
39     },
40     {
41       "name" : "fields",
42       "type" : "Array",
43       "desc" : "Array of field definition objects",
44       "memberOf" : "Roo.data.ArrayReader",
45       "optvals" : [
46       ]
47     }
48   ],
49   "methods" : [
50     {
51       "name" : "readRecords",
52       "desc" : "Create a data block containing Roo.data.Records from an XML document.",
53       "isStatic" : false,
54       "isConstructor" : false,
55       "isPrivate" : false,
56       "memberOf" : "Roo.data.ArrayReader",
57       "example" : "",
58       "deprecated" : "",
59       "since" : "",
60       "see" : "",
61       "params" : [
62         {
63           "name" : "o",
64           "type" : "Object",
65           "desc" : "An Array of row objects which represents the dataset.",
66           "isOptional" : false
67         }
68       ],
69       "returns" : [
70         {
71           "name" : "",
72           "type" : "Object",
73           "desc" : "A data block which is used by an {@link Roo.data.Store} object as\na cache of Roo.data.Records."
74         }
75       ]
76     },
77     {
78       "name" : "newRow",
79       "desc" : "Create an empty record",
80       "isStatic" : false,
81       "isConstructor" : false,
82       "isPrivate" : false,
83       "memberOf" : "Roo.data.DataReader",
84       "example" : "",
85       "deprecated" : "",
86       "since" : "",
87       "see" : "",
88       "params" : [
89         {
90           "name" : "data",
91           "type" : "Object",
92           "desc" : "(optional) - overlay some values",
93           "isOptional" : false
94         }
95       ],
96       "returns" : [
97         {
98           "name" : "",
99           "type" : "Roo.data.Record",
100           "desc" : "record created."
101         }
102       ]
103     }
104   ],
105   "events" : [
106   ]
107 }