sync
[roojs1] / docs / symbols / Roo.data.ArrayReader.json
1 {
2   "name" : "Roo.data.ArrayReader",
3   "augments" : [
4     "Roo.data.DataReader"
5   ],
6   "childClasses" : [],
7   "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>",
8   "isSingleton" : false,
9   "isStatic" : false,
10   "isBuiltin" : false,
11   "memberOf" : "ArrayReader",
12   "example" : "",
13   "deprecated" : "",
14   "since" : "",
15   "see" : "",
16   "params" : [
17     {
18       "name" : "meta",
19       "type" : "Object",
20       "desc" : "Metadata configuration options.",
21       "isOptional" : false
22     },
23     {
24       "name" : "recordType",
25       "type" : "Object|Array",
26       "desc" : "Either an Array of field definition objects",
27       "isOptional" : false
28     }
29   ],
30   "returns" : [],
31   "throws" : "",
32   "requires" : "",
33   "config" : [
34     {
35       "name" : "id",
36       "type" : "String",
37       "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}.",
38       "memberOf" : ""
39     },
40     {
41       "name" : "fields",
42       "type" : "Array",
43       "desc" : "Array of field definition objects",
44       "memberOf" : ""
45     }
46   ],
47   "methods" : [
48     {
49       "name" : "readRecords",
50       "type" : "function",
51       "desc" : "Create a data block containing Roo.data.Records from an XML document.",
52       "sig" : "(o)",
53       "static" : false,
54       "memberOf" : "",
55       "isStatic" : false,
56       "isConstructor" : false,
57       "isPrivate" : false,
58       "example" : "",
59       "deprecated" : "",
60       "since" : "",
61       "see" : "",
62       "exceptions" : "",
63       "requires" : "",
64       "params" : [
65         {
66           "name" : "o",
67           "type" : "Object",
68           "desc" : "An Array of row objects which represents the dataset.",
69           "isOptional" : false
70         }
71       ],
72       "returns" : [
73         {
74           "name" : "",
75           "type" : "Object",
76           "desc" : "A data block which is used by an {@link Roo.data.Store} object as\na cache of Roo.data.Records."
77         }
78       ]
79     },
80     {
81       "name" : "newRow",
82       "type" : "function",
83       "desc" : "Create an empty record",
84       "sig" : "(data)",
85       "static" : false,
86       "memberOf" : "Roo.data.DataReader",
87       "isStatic" : false,
88       "isConstructor" : false,
89       "isPrivate" : false,
90       "example" : "",
91       "deprecated" : "",
92       "since" : "",
93       "see" : "",
94       "exceptions" : "",
95       "requires" : "",
96       "params" : [
97         {
98           "name" : "data",
99           "type" : "Object",
100           "desc" : "(optional) - overlay some values",
101           "isOptional" : false
102         }
103       ],
104       "returns" : [
105         {
106           "name" : "",
107           "type" : "Roo.data.Record",
108           "desc" : "record created."
109         }
110       ]
111     }
112   ],
113   "events" : []
114 }