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