-<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.data.JsonReader-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.data.JsonReader-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.data.JsonReader-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="inner-link" href="#Ext.data.JsonReader-configs"><img src="resources/images/default/s.gif" class="item-icon icon-config">Config Options</a> <a class="bookmark" href="../docs/?class=Ext.data.JsonReader"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.data.DataReader.html" ext:member="" ext:cls="Ext.data.DataReader">DataReader</a> <img src="resources/elbow-end.gif">JsonReader</pre></div><h1>Class <a href="source/JsonReader.html#cls-Ext.data.JsonReader">Ext.data.JsonReader</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.data</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">JsonReader.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/JsonReader.html#cls-Ext.data.JsonReader">JsonReader</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.data.ArrayReader.html" ext:cls="Ext.data.ArrayReader">ArrayReader</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.data.DataReader.html" ext:cls="Ext.data.DataReader" ext:member="">DataReader</a></td></tr></table><div class="description"><p>Data reader class to create an Array of <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a> objects from a JSON response
-based on mappings in a provided <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a> constructor.</p>
+<div xmlns:ext="http://www.extjs.com" class="body-wrap"><div class="inheritance res-block"><pre class="res-block-inner"><a href="output/Ext.data.DataReader.html" ext:member="" ext:cls="Ext.data.DataReader">DataReader</a> <img src="resources/elbow-end.gif">JsonReader</pre></div><h1>Class <a href="source/JsonReader.html#cls-Ext.data.JsonReader">Ext.data.JsonReader</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.data</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">JsonReader.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/JsonReader.html#cls-Ext.data.JsonReader">JsonReader</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.data.ArrayReader.html" ext:cls="Ext.data.ArrayReader">ArrayReader</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info"><a href="output/Ext.data.DataReader.html" ext:cls="Ext.data.DataReader" ext:member="">DataReader</a></td></tr></table><div class="description"><p>Data reader class to create an Array of <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a> objects
+from a JSON packet based on mappings in a provided <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a>
+constructor.</p>
<p>Example code:</p>
-<pre><code><b>var</b> Employee = Ext.data.Record.create([
- {name: <em>'firstname'</em>}, <i>// map the Record<em>'s <em>"firstname"</em> field to the row object'</em>s key of the same name</i>
- {name: <em>'job'</em>, mapping: <em>'occupation'</em>} <i>// map the Record<em>'s <em>"job"</em> field to the row object'</em>s <em>"occupation"</em> key</i>
-]);
-<b>var</b> myReader = <b>new</b> Ext.data.JsonReader(
- { <i>// The metadata property, <b>with</b> configuration options:</i>
- totalProperty: <em>"results"</em>, <i>// the property which contains the total dataset size (optional)</i>
- root: <em>"rows"</em>, <i>// the property which contains an Array of record data objects</i>
- idProperty: <em>"id"</em> <i>// the property within each row object that provides an ID <b>for</b> the record (optional)</i>
- },
- Employee <i>// <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a> constructor that provides mapping <b>for</b> JSON object</i>
-);</code></pre>
+<pre><code><b>var</b> myReader = <b>new</b> Ext.data.JsonReader({
+ <i>// metadata configuration options:</i>
+ <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-idProperty" ext:member="idProperty" ext:cls="Ext.data.JsonReader">idProperty</a>: <em>'id'</em>
+ <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-root" ext:member="root" ext:cls="Ext.data.JsonReader">root</a>: <em>'rows'</em>,
+ <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-totalProperty" ext:member="totalProperty" ext:cls="Ext.data.JsonReader">totalProperty</a>: <em>'results'</em>,
+ <a href="output/Ext.data.DataReader.html#Ext.data.DataReader-messageProperty" ext:member="messageProperty" ext:cls="Ext.data.DataReader">Ext.data.DataReader.messageProperty</a>: <em>"msg"</em> <i>// The element within the response that provides a user-feedback message (optional)</i>
+
+ <i>// the fields config option will internally create an <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Ext.data.Record</a></i>
+ <i>// constructor that provides mapping <b>for</b> reading the record data objects</i>
+ <a href="output/Ext.data.DataReader.html#Ext.data.DataReader-fields" ext:member="fields" ext:cls="Ext.data.DataReader">fields</a>: [
+ <i>// map Record's <em>'firstname'</em> field to data object's key of same name</i>
+ {name: <em>'name'</em>},
+ <i>// map Record's <em>'job'</em> field to data object's <em>'occupation'</em> key</i>
+ {name: <em>'job'</em>, mapping: <em>'occupation'</em>}
+ ]
+});</code></pre>
<p>This would consume a JSON data object of the form:</p><pre><code>{
- results: 2, <i>// Reader<em>'s configured totalProperty</i>
- rows: [ <i>// Reader'</em>s configured root</i>
- { id: 1, firstname: <em>'Bill'</em>, occupation: <em>'Gardener'</em> }, <i>// a row object</i>
- { id: 2, firstname: <em>'Ben'</em> , occupation: <em>'Horticulturalist'</em> } <i>// another row object</i>
+ results: 2000, <i>// Reader's configured <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-totalProperty" ext:member="totalProperty" ext:cls="Ext.data.JsonReader">totalProperty</a></i>
+ rows: [ <i>// Reader's configured <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-root" ext:member="root" ext:cls="Ext.data.JsonReader">root</a></i>
+ <i>// record data objects:</i>
+ { <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-idProperty" ext:member="idProperty" ext:cls="Ext.data.JsonReader">id</a>: 1, firstname: <em>'Bill'</em>, occupation: <em>'Gardener'</em> },
+ { <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-idProperty" ext:member="idProperty" ext:cls="Ext.data.JsonReader">id</a>: 2, firstname: <em>'Ben'</em> , occupation: <em>'Horticulturalist'</em> },
+ ...
]
}</code></pre>
<p><b><u>Automatic configuration using metaData</u></b></p>
-<p>It is possible to change a JsonReader's metadata at any time by including a <b><tt>metaData</tt></b>
-property in the JSON data object. If the JSON data object has a <b><tt>metaData</tt></b> property, a
-<a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Store</a> object using this Reader will reconfigure itself to use the newly provided
-field definition and fire its <a href="output/Ext.data.Store.html#Ext.data.Store-metachange" ext:member="metachange" ext:cls="Ext.data.Store">metachange</a> event. The metachange event
-handler may interrogate the <b><tt>metaData</tt></b> property to perform any configuration required.
-Note that reconfiguring a Store potentially invalidates objects which may refer to Fields or Records
-which no longer exist.</p>
-<p>The <b><tt>metaData</tt></b> property in the JSON data object may contain:</p>
-<div class="mdetail-params"><ul>
-<li>any of the configuration options for this class</li>
-<li>a <b><tt><a href="output/Ext.data.Record.html#Ext.data.Record-fields" ext:member="fields" ext:cls="Ext.data.Record">fields</a></tt></b> property which the JsonReader will
-use as an argument to the <a href="output/Ext.data.Record.html#Ext.data.Record-create" ext:member="create" ext:cls="Ext.data.Record">data Record create method</a> in order to
-configure the layout of the Records it will produce.</li>
-<li>a <b><tt><a href="output/Ext.data.Store.html#Ext.data.Store-sortInfo" ext:member="sortInfo" ext:cls="Ext.data.Store">sortInfo</a></tt></b> property which the JsonReader will
-use to set the <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a>'s <a href="output/Ext.data.Store.html#Ext.data.Store-sortInfo" ext:member="sortInfo" ext:cls="Ext.data.Store">sortInfo</a> property</li>
-<li>any user-defined properties needed</li>
-</ul></div>
-<p>To use this facility to send the same data as the example above (without having to code the creation
-of the Record constructor), you would create the JsonReader like this:</p><pre><code><b>var</b> myReader = <b>new</b> Ext.data.JsonReader();</code></pre>
-<p>The first data packet from the server would configure the reader by containing a
-<b><tt>metaData</tt></b> property <b>and</b> the data. For example, the JSON data object might take
-the form:</p>
-<pre><code>{
+<p>It is possible to change a JsonReader's metadata at any time by including
+a <b><tt>metaData</tt></b> property in the JSON data object. If the JSON data
+object has a <b><tt>metaData</tt></b> property, a <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Store</a>
+object using this Reader will reconfigure itself to use the newly provided
+field definition and fire its <a href="output/Ext.data.Store.html#Ext.data.Store-metachange" ext:member="metachange" ext:cls="Ext.data.Store">metachange</a>
+event. The metachange event handler may interrogate the <b><tt>metaData</tt></b>
+property to perform any configuration required.</p>
+<p>Note that reconfiguring a Store potentially invalidates objects which may
+refer to Fields or Records which no longer exist.</p>
+<p>To use this facility you would create the JsonReader like this:</p><pre><code><b>var</b> myReader = <b>new</b> Ext.data.JsonReader();</code></pre>
+<p>The first data packet from the server would configure the reader by
+containing a <b><tt>metaData</tt></b> property <b>and</b> the data. For
+example, the JSON data object might take the form:</p><pre><code>{
metaData: {
- idProperty: <em>'id'</em>,
- root: <em>'rows'</em>,
- totalProperty: <em>'results'</em>,
- fields: [
- {name: <em>'name'</em>},
- {name: <em>'job'</em>, mapping: <em>'occupation'</em>}
+ <em>"<a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-idProperty" ext:member="idProperty" ext:cls="Ext.data.JsonReader">idProperty</a>"</em>: <em>"id"</em>,
+ <em>"<a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-root" ext:member="root" ext:cls="Ext.data.JsonReader">root</a>"</em>: <em>"rows"</em>,
+ <em>"<a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-totalProperty" ext:member="totalProperty" ext:cls="Ext.data.JsonReader">totalProperty</a>"</em>: <em>"results"</em>
+ <em>"<a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-successProperty" ext:member="successProperty" ext:cls="Ext.data.JsonReader">successProperty</a>"</em>: <em>"success"</em>,
+ <em>"<a href="output/Ext.data.DataReader.html#Ext.data.DataReader-fields" ext:member="fields" ext:cls="Ext.data.DataReader">fields</a>"</em>: [
+ {<em>"name"</em>: <em>"name"</em>},
+ {<em>"name"</em>: <em>"job"</em>, <em>"mapping"</em>: <em>"occupation"</em>}
],
- sortInfo: {field: <em>'name'</em>, direction:<em>'ASC'</em>}, <i>// used by store to set its sortInfo</i>
- foo: <em>'bar'</em> <i>// custom property</i>
+ <i>// used by store to set its sortInfo</i>
+ <em>"sortInfo"</em>:{
+ <em>"field"</em>: <em>"name"</em>,
+ <em>"direction"</em>: <em>"ASC"</em>
+ },
+ <i>// <a href="output/Ext.PagingToolbar.html" ext:cls="Ext.PagingToolbar">paging data</a> (<b>if</b> applicable)</i>
+ <em>"start"</em>: 0,
+ <em>"limit"</em>: 2,
+ <i>// custom property</i>
+ <em>"foo"</em>: <em>"bar"</em>
},
- results: 2,
- rows: [ <i>// an Array</i>
- { <em>'id'</em>: 1, <em>'name'</em>: <em>'Bill'</em>, occupation: <em>'Gardener'</em> },
- { <em>'id'</em>: 2, <em>'name'</em>: <em>'Ben'</em>, occupation: <em>'Horticulturalist'</em> }
+ <i>// Reader's configured <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-successProperty" ext:member="successProperty" ext:cls="Ext.data.JsonReader">successProperty</a></i>
+ <em>"success"</em>: true,
+ <i>// Reader's configured <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-totalProperty" ext:member="totalProperty" ext:cls="Ext.data.JsonReader">totalProperty</a></i>
+ <em>"results"</em>: 2000,
+ <i>// Reader's configured <a href="output/Ext.data.JsonReader.html#Ext.data.JsonReader-root" ext:member="root" ext:cls="Ext.data.JsonReader">root</a></i>
+ <i>// (this data simulates 2 results <a href="output/Ext.PagingToolbar.html" ext:cls="Ext.PagingToolbar">per page</a>)</i>
+ <em>"rows"</em>: [ <i>// <b>*Note:</b> this must be an Array</i>
+ { <em>"id"</em>: 1, <em>"name"</em>: <em>"Bill"</em>, <em>"occupation"</em>: <em>"Gardener"</em> },
+ { <em>"id"</em>: 2, <em>"name"</em>: <em>"Ben"</em>, <em>"occupation"</em>: <em>"Horticulturalist"</em> }
]
-}</code></pre></div><div class="hr"></div><a id="Ext.data.JsonReader-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-fields"></a><b><a href="source/DataReader.html#cfg-Ext.data.DataReader-fields">fields</a></b> : Array/Object<div class="mdesc"><div class="short">Either an Array of Field definition objects (which
+}</code></pre>
+<p>The <b><tt>metaData</tt></b> property in the JSON data object should contain:</p>
+<div class="mdetail-params"><ul>
+<li>any of the configuration options for this class</li>
+<li>a <b><tt><a href="output/Ext.data.Record.html#Ext.data.Record-fields" ext:member="fields" ext:cls="Ext.data.Record">fields</a></tt></b> property which
+the JsonReader will use as an argument to the
+<a href="output/Ext.data.Record.html#Ext.data.Record-create" ext:member="create" ext:cls="Ext.data.Record">data Record create method</a> in order to
+configure the layout of the Records it will produce.</li>
+<li>a <b><tt><a href="output/Ext.data.Store.html#Ext.data.Store-sortInfo" ext:member="sortInfo" ext:cls="Ext.data.Store">sortInfo</a></tt></b> property
+which the JsonReader will use to set the <a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a>'s
+<a href="output/Ext.data.Store.html#Ext.data.Store-sortInfo" ext:member="sortInfo" ext:cls="Ext.data.Store">sortInfo</a> property</li>
+<li>any custom properties needed</li>
+</ul></div></div><div class="hr"></div><a id="Ext.data.JsonReader-configs"></a><h2>Config Options</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Config Options</th><th class="msource-header">Defined By</th></tr><tr class="config-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-fields"></a><b><a href="source/DataReader.html#cfg-Ext.data.DataReader-fields">fields</a></b> : Array/Object<div class="mdesc"><div class="short">Either an Array of Field definition objects (which
will be passed to Ext.data.Record.create, or a Record
constructo...</div><div class="long"><p>Either an Array of <a href="output/Ext.data.Field.html" ext:cls="Ext.data.Field">Field</a> definition objects (which\r
will be passed to <a href="output/Ext.data.Record.html#Ext.data.Record-create" ext:member="create" ext:cls="Ext.data.Record">Ext.data.Record.create</a>, or a <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Record</a>\r
-constructor created from <a href="output/Ext.data.Record.html#Ext.data.Record-create" ext:member="create" ext:cls="Ext.data.Record">Ext.data.Record.create</a>.</p></div></div></td><td class="msource"><a href="output/Ext.data.DataReader.html#fields" ext:member="#fields" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-idProperty"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-idProperty">idProperty</a></b> : String<div class="mdesc">[id] Name of the property within a row object that contains a record identifier value. Defaults to <tt>id</tt></div></td><td class="msource">JsonReader</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-root"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-root">root</a></b> : String<div class="mdesc"><div class="short">[undefined] Required. The name of the property
+constructor created from <a href="output/Ext.data.Record.html#Ext.data.Record-create" ext:member="create" ext:cls="Ext.data.Record">Ext.data.Record.create</a>.</p></div></div></td><td class="msource"><a href="output/Ext.data.DataReader.html#fields" ext:member="#fields" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="config-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-idProperty"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-idProperty">idProperty</a></b> : String<div class="mdesc">[id] Name of the property within a row object
+that contains a record identifier value. Defaults to <tt>id</tt></div></td><td class="msource">JsonReader</td></tr><tr class="config-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-messageProperty"></a><b><a href="source/DataReader.html#cfg-Ext.data.DataReader-messageProperty">messageProperty</a></b> : String<div class="mdesc">[undefined] Optional name of a property within a server-response that represents a user-feedback message.</div></td><td class="msource"><a href="output/Ext.data.DataReader.html#messageProperty" ext:member="#messageProperty" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-root"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-root">root</a></b> : String<div class="mdesc"><div class="short">[undefined] Required. The name of the property
which contains the Array of row objects. Defaults to undefined.
An e...</div><div class="long">[undefined] <b>Required</b>. The name of the property
which contains the Array of row objects. Defaults to <tt>undefined</tt>.
-An exception will be thrown if the root property is undefined. The data packet
-value for this property should be an empty array to clear the data or show
-no data.</div></div></td><td class="msource">JsonReader</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-successProperty"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-successProperty">successProperty</a></b> : String<div class="mdesc"><div class="short">[success] Name of the property from which to
+An exception will be thrown if the root property is undefined. The data
+packet value for this property should be an empty array to clear the data
+or show no data.</div></div></td><td class="msource">JsonReader</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-successProperty"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-successProperty">successProperty</a></b> : String<div class="mdesc"><div class="short">[success] Name of the property from which to
retrieve the success attribute. Defaults to success. See
Ext.data.DataP...</div><div class="long">[success] Name of the property from which to
retrieve the success attribute. Defaults to <tt>success</tt>. See
<a href="output/Ext.data.DataProxy.html" ext:cls="Ext.data.DataProxy">Ext.data.DataProxy</a>.<a href="output/Ext.data.DataProxy.html#Ext.data.DataProxy-exception" ext:member="exception" ext:cls="Ext.data.DataProxy">exception</a>
-for additional information.</div></div></td><td class="msource">JsonReader</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-totalProperty"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-totalProperty">totalProperty</a></b> : String<div class="mdesc"><div class="short">[total] Name of the property from which to retrieve the total number of records
-in the dataset. This is only needed i...</div><div class="long">[total] Name of the property from which to retrieve the total number of records
-in the dataset. This is only needed if the whole dataset is not passed in one go, but is being
-paged from the remote server. Defaults to <tt>total</tt>.</div></div></td><td class="msource">JsonReader</td></tr></tbody></table><a id="Ext.data.JsonReader-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-buildExtractors"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-buildExtractors">buildExtractors</a></b> : Object<div class="mdesc">Abstract method, overridden in <a href="output/Ext.data.JsonReader.html" ext:cls="Ext.data.JsonReader">Ext.data.JsonReader</a></div></td><td class="msource"><a href="output/Ext.data.DataReader.html#buildExtractors" ext:member="#buildExtractors" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-jsonData"></a><b><a href="source/JsonReader.html#prop-Ext.data.JsonReader-jsonData">jsonData</a></b> : Object<div class="mdesc"><div class="short">After any data loads, the raw JSON data is available for further custom processing. If no data is
+for additional information.</div></div></td><td class="msource">JsonReader</td></tr><tr class="config-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-totalProperty"></a><b><a href="source/JsonReader.html#cfg-Ext.data.JsonReader-totalProperty">totalProperty</a></b> : String<div class="mdesc"><div class="short">[total] Name of the property from which to
+retrieve the total number of records in the dataset. This is only needed
+i...</div><div class="long">[total] Name of the property from which to
+retrieve the total number of records in the dataset. This is only needed
+if the whole dataset is not passed in one go, but is being paged from
+the remote server. Defaults to <tt>total</tt>.</div></div></td><td class="msource">JsonReader</td></tr></tbody></table><a id="Ext.data.JsonReader-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-buildExtractors"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-buildExtractors">buildExtractors</a></b> : Object<div class="mdesc">Abstract method, overridden in DataReader extensions such as <a href="output/Ext.data.JsonReader.html" ext:cls="Ext.data.JsonReader">Ext.data.JsonReader</a> and <a href="output/Ext.data.XmlReader.html" ext:cls="Ext.data.XmlReader">Ext.data.XmlReader</a></div></td><td class="msource"><a href="output/Ext.data.DataReader.html#buildExtractors" ext:member="#buildExtractors" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-extractData"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-extractData">extractData</a></b> : Object<div class="mdesc">Abstract method overridden in DataReader extensions such as <a href="output/Ext.data.JsonReader.html" ext:cls="Ext.data.JsonReader">Ext.data.JsonReader</a> and <a href="output/Ext.data.XmlReader.html" ext:cls="Ext.data.XmlReader">Ext.data.XmlReader</a></div></td><td class="msource"><a href="output/Ext.data.DataReader.html#extractData" ext:member="#extractData" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-extractValues"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-extractValues">extractValues</a></b> : Object<div class="mdesc">Abstract method overridden in DataReader extensions such as <a href="output/Ext.data.JsonReader.html" ext:cls="Ext.data.JsonReader">Ext.data.JsonReader</a> and <a href="output/Ext.data.XmlReader.html" ext:cls="Ext.data.XmlReader">Ext.data.XmlReader</a></div></td><td class="msource"><a href="output/Ext.data.DataReader.html#extractValues" ext:member="#extractValues" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-getId"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-getId">getId</a></b> : Object<div class="mdesc">Abstract method created in extension's buildExtractors impl.</div></td><td class="msource"><a href="output/Ext.data.DataReader.html#getId" ext:member="#getId" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-getMessage"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-getMessage">getMessage</a></b> : Object<div class="mdesc">Abstract method created in extension's buildExtractors impl.</div></td><td class="msource"><a href="output/Ext.data.DataReader.html#getMessage" ext:member="#getMessage" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-getRoot"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-getRoot">getRoot</a></b> : Object<div class="mdesc">Abstract method created in extension's buildExtractors impl.</div></td><td class="msource"><a href="output/Ext.data.DataReader.html#getRoot" ext:member="#getRoot" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-getSuccess"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-getSuccess">getSuccess</a></b> : Object<div class="mdesc">Abstract method created in extension's buildExtractors impl.</div></td><td class="msource"><a href="output/Ext.data.DataReader.html#getSuccess" ext:member="#getSuccess" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-getTotal"></a><b><a href="source/DataReader.html#prop-Ext.data.DataReader-getTotal">getTotal</a></b> : Object<div class="mdesc">Abstract method created in extension's buildExtractors impl.</div></td><td class="msource"><a href="output/Ext.data.DataReader.html#getTotal" ext:member="#getTotal" ext:cls="Ext.data.DataReader">DataReader</a></td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-jsonData"></a><b><a href="source/JsonReader.html#prop-Ext.data.JsonReader-jsonData">jsonData</a></b> : Object<div class="mdesc"><div class="short">After any data loads, the raw JSON data is available for further custom processing. If no data is
loaded or there is...</div><div class="long">After any data loads, the raw JSON data is available for further custom processing. If no data is
loaded or there is a load exception this property will be undefined.</div></div></td><td class="msource">JsonReader</td></tr><tr class="property-row "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-meta"></a><b><a href="source/JsonReader.html#prop-Ext.data.JsonReader-meta">meta</a></b> : Mixed<div class="mdesc">This JsonReader's metadata as passed to the constructor, or as passed in
the last data packet's <b><tt>metaData</tt></b> property.</div></td><td class="msource">JsonReader</td></tr></tbody></table><a id="Ext.data.JsonReader-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-JsonReader"></a><b><a href="source/JsonReader.html#cls-Ext.data.JsonReader">JsonReader</a></b>( <code>Object meta</code>, <code>Array/Object recordType</code> )
which contains the total size of the dataset.</div></li></ul><strong>Returns:</strong><ul><li><code>Object</code><div class="sub-desc">data A data block which is used by an Ext.data.Store object as
a cache of Ext.data.Records.</div></li></ul></div></div></div></td><td class="msource">JsonReader</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.JsonReader-readResponse"></a><b><a href="source/JsonReader.html#method-Ext.data.JsonReader-readResponse">readResponse</a></b>( <code>String action</code>, <code>Object response</code> )
:
- void<div class="mdesc"><div class="short">Decode a json response from server.</div><div class="long">Decode a json response from server.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>action</code> : String<div class="sub-desc">[Ext.data.Api.actions.create|read|update|destroy]</div></li><li><code>response</code> : Object<div class="sub-desc"></div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">JsonReader</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-realize"></a><b><a href="source/DataReader.html#method-Ext.data.DataReader-realize">realize</a></b>( <code>Record/Record[] record</code>, <code>Object/Object[] data</code> )
+ void<div class="mdesc"><div class="short">Decode a json response from server.</div><div class="long">Decode a json response from server.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>action</code> : String<div class="sub-desc">[Ext.data.Api.actions.create|read|update|destroy]</div></li><li><code>response</code> : Object<div class="sub-desc">TODO: refactor code between JsonReader#readRecords, #readResponse into 1 method.
+there's ugly duplication going on due to maintaining backwards compat. with 2.0. It's time to do this.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">JsonReader</td></tr><tr class="method-row expandable inherited"><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.data.DataReader-realize"></a><b><a href="source/DataReader.html#method-Ext.data.DataReader-realize">realize</a></b>( <code>Record/Record[] record</code>, <code>Object/Object[] data</code> )
:
void<div class="mdesc"><div class="short">Used for un-phantoming a record after a successful database insert. Sets the records pk along with new data from ser...</div><div class="long">Used for un-phantoming a record after a successful database insert. Sets the records pk along with new data from server.\r
You <b>must</b> return at least the database pk using the idProperty defined in your DataReader configuration. The incoming\r