<!-- ============================== class summary ========================== -->
<div class="description">
- Data reader class to create an Array of Roo.data.Record objects from a JSON response<br/>based on mappings in a provided Roo.data.Record constructor.<br/><p><br/>Example code:<br/><pre><code><br/>var RecordDef = Roo.data.Record.create([<br/> {name: 'name', mapping: 'name'}, // "mapping" property not needed if it's the same as "name"<br/> {name: 'occupation'} // This field will use "occupation" as the mapping.<br/>]);<br/>var myReader = new Roo.data.JsonReader({<br/> totalProperty: "results", // The property which contains the total dataset size (optional)<br/> root: "rows", // The property which contains an Array of row objects<br/> id: "id" // The property within each row object that provides an ID for the record (optional)<br/>}, RecordDef);<br/></code></pre><br/><p><br/>This would consume a JSON file like this:<br/><pre><code><br/>{ 'results': 2, 'rows': [<br/> { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },<br/> { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' } ]<br/>}<br/></code></pre>
+ Data reader class to create an Array of Roo.data.Record objects from a JSON response<br/>based on mappings in a provided Roo.data.Record constructor.<br/><br/>The default behaviour of a store is to send ?_requestMeta=1, unless the class has recieved 'metaData' property<br/>in the reply previously. <br/><br/><p><br/>Example code:<br/><pre><code><br/>var RecordDef = Roo.data.Record.create([<br/> {name: 'name', mapping: 'name'}, // "mapping" property not needed if it's the same as "name"<br/> {name: 'occupation'} // This field will use "occupation" as the mapping.<br/>]);<br/>var myReader = new Roo.data.JsonReader({<br/> totalProperty: "results", // The property which contains the total dataset size (optional)<br/> root: "rows", // The property which contains an Array of row objects<br/> id: "id" // The property within each row object that provides an ID for the record (optional)<br/>}, RecordDef);<br/></code></pre><br/><p><br/>This would consume a JSON file like this:<br/><pre><code><br/>{ 'results': 2, 'rows': [<br/> { 'id': 1, 'name': 'Bill', occupation: 'Gardener' },<br/> { 'id': 2, 'name': 'Ben', occupation: 'Horticulturalist' } ]<br/>}<br/></code></pre>
</div>
</tr>
- <tr class="method-row config-row-alt1 expandable notInherited">
+ <tr class="method-row config-row-alt1 expandable">
+ <td class="micon"><a class="exi" href="#expand"> </a></td>
+
+
+ <td class="sig">
+ <a id="Roo.data.DataReader-method-newRow" name=".newRow"></a>
+ <div class="fixedFont">
+ <span class="attributes"></span><b class="itemname">newRow</b>
+
+ (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>data</i></B>)
+
+
+ :
+
+
+ <a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a>
+
+
+
+
+
+ </div>
+ <div class="mdesc">
+
+ <div class="short">Create an empty record</div>
+
+
+
+ <div class="long">
+
+ Create an empty record
+
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Parameters:</dt>
+
+ <dt>
+ <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>data</b>
+
+ </dt>
+ <dd>(optional) - overlay some values</dd>
+
+ </dl>
+
+
+
+
+
+ <dl class="detailList">
+ <dt class="heading">Returns:</dt>
+
+ <dd><span class="fixedFont"><a href="./Roo.data.Record.html#constructor" roo:cls="Roo.data.Record.html#constructor">Roo.data.Record</a></span> record created.</dd>
+
+ </dl>
+
+
+
+
+
+
+
+ </div>
+ </div>
+
+ </td>
+ <td class="msource">
+
+ <a href="./Roo.data.DataReader.html#constructor" roo:cls="Roo.data.DataReader.html#constructor">Roo.data.DataReader</a>
+
+ </td>
+ </tr>
+
+
+ <tr class="method-row config-row-alt0 expandable notInherited">
<td class="micon"><a class="exi" href="#expand"> </a></td>
</tr>
- <tr class="method-row config-row-alt0 expandable notInherited">
+ <tr class="method-row config-row-alt1 expandable notInherited">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<!-- ============================== footer ================================= -->
<div class="fineprint" style="clear:both">
- Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 16 2010 15:55:24 GMT+0800 (HKT)
+ Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Wed Nov 10 2010 15:19:21 GMT+0800 (HKT)
Based on
<a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>
</div>