sync
[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" : true,
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     },
44     {
45       "name" : "fields",
46       "type" : "Array",
47       "desc" : "Array of field definition objects",
48       "memberOf" : ""
49     }
50   ],
51   "methods" : [
52     {
53       "name" : "readRecords",
54       "type" : "function",
55       "desc" : "Create a data block containing Roo.data.Records from an XML document.",
56       "sig" : "(o)",
57       "static" : false,
58       "memberOf" : "",
59       "isStatic" : false,
60       "isConstructor" : false,
61       "isPrivate" : false,
62       "example" : "",
63       "deprecated" : "",
64       "since" : "",
65       "see" : "",
66       "exceptions" : "",
67       "requires" : "",
68       "params" : [
69         {
70           "name" : "o",
71           "type" : "Object",
72           "desc" : "An Array of row objects which represents the dataset.",
73           "isOptional" : false
74         }
75       ],
76       "returns" : [
77         {
78           "name" : "",
79           "type" : "Object",
80           "desc" : "A data block which is used by an {@link Roo.data.Store} object as\na cache of Roo.data.Records."
81         }
82       ]
83     },
84     {
85       "name" : "newRow",
86       "type" : "function",
87       "desc" : "Create an empty record",
88       "sig" : "(data)",
89       "static" : false,
90       "memberOf" : "Roo.data.DataReader",
91       "isStatic" : false,
92       "isConstructor" : false,
93       "isPrivate" : false,
94       "example" : "",
95       "deprecated" : "",
96       "since" : "",
97       "see" : "",
98       "exceptions" : "",
99       "requires" : "",
100       "params" : [
101         {
102           "name" : "data",
103           "type" : "Object",
104           "desc" : "(optional) - overlay some values",
105           "isOptional" : false
106         }
107       ],
108       "returns" : [
109         {
110           "name" : "",
111           "type" : "Roo.data.Record",
112           "desc" : "record created."
113         }
114       ]
115     }
116   ],
117   "events" : []
118 }