source: trunk/web/addons/job_monarch/lib/extjs/docs/output/Ext.data.ArrayReader.html @ 619

Last change on this file since 619 was 619, checked in by ramonb, 15 years ago

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 11.8 KB
Line 
1        <div class="body-wrap">
2        <div class="top-tools">
3            <a class="inner-link" href="#Ext.data.ArrayReader-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4            <a class="inner-link" href="#Ext.data.ArrayReader-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5            <a class="inner-link" href="#Ext.data.ArrayReader-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6                            <a class="inner-link" href="#Ext.data.ArrayReader-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7                        <a class="bookmark" href="../docs/?class=Ext.data.ArrayReader"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
8        </div>
9                <div class="inheritance res-block">
10<pre class="res-block-inner"><a ext:cls="Ext.data.DataReader" ext:member="" href="output/Ext.data.DataReader.html">DataReader</a>
11  <img src="resources/elbow-end.gif"/><a ext:cls="Ext.data.JsonReader" ext:member="" href="output/Ext.data.JsonReader.html">JsonReader</a>
12    <img src="resources/elbow-end.gif"/>ArrayReader</pre></div>
13                <h1>Class Ext.data.ArrayReader</h1>
14        <table cellspacing="0">
15            <tr><td class="label">Package:</td><td class="hd-info">Ext.data</td></tr>
16            <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/ArrayReader.js" target="_blank">ArrayReader.js</a></td></tr>
17            <tr><td class="label">Class:</td><td class="hd-info">ArrayReader</td></tr>
18                                    <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.data.JsonReader" ext:member="" href="output/Ext.data.JsonReader.html">JsonReader</a></td></tr>
19                    </table>
20        <div class="description">
21            *
22Data reader class to create an Array of <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Ext.data.Record</a> objects from an Array.
23Each element of that Array represents a row of data fields. The
24fields are pulled into a Record object using as a subscript, the <em>mapping</em> property
25of the field definition if it exists, or the field's ordinal position in the definition.<br>
26<p>
27Example code:.
28<pre><code>var Employee = Ext.data.Record.create([
29    {name: <em>'name'</em>, mapping: 1},         <i>// <em>"mapping"</em> only needed <b>if</b> an <em>"id"</em> field is present which</i>
30    {name: <em>'occupation'</em>, mapping: 2}    <i>// precludes using the ordinal position as the index.</i>
31]);
32<b>var</b> myReader = <b>new</b> Ext.data.ArrayReader({
33    id: 0                     <i>// The subscript within row Array that provides an ID <b>for</b> the Record (optional)</i>
34}, Employee);</code></pre>
35<p>
36This would consume an Array like this:
37<pre><code>[ [1, <em>'Bill'</em>, <em>'Gardener'</em>], [2, <em>'Ben'</em>, <em>'Horticulturalist'</em>] ]</code></pre>        </div>
38       
39        <div class="hr"></div>
40                <a id="Ext.data.ArrayReader-configs"></a>
41        <h2>Config Options</h2>
42        <table cellspacing="0" class="member-table">
43            <tr>
44                <th class="sig-header" colspan="2">Config Options</th>
45                <th class="msource-header">Defined By</th>
46            </tr>
47                <tr class="config-row">
48        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
49        <td class="sig">
50        <a id="Ext.data.ArrayReader-id"></a>
51            <b>id</b> : String            <div class="mdesc">
52                            (optional) The subscript within row Array that provides an ID for the Record                        </div>
53        </td>
54        <td class="msource">ArrayReader</td>
55    </tr>
56        <tr class="config-row inherited alt">
57        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
58        <td class="sig">
59        <a id="Ext.data.ArrayReader-root"></a>
60            <b>root</b> : String            <div class="mdesc">
61                            name of the property which contains the Array of row objects.                        </div>
62        </td>
63        <td class="msource"><a ext:cls="Ext.data.JsonReader" ext:member="#root" href="output/Ext.data.JsonReader.html#root">JsonReader</a></td>
64    </tr>
65        <tr class="config-row inherited">
66        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
67        <td class="sig">
68        <a id="Ext.data.ArrayReader-successProperty"></a>
69            <b>successProperty</b> : String            <div class="mdesc">
70                            Name of the property from which to retrieve the success attribute used by forms.                        </div>
71        </td>
72        <td class="msource"><a ext:cls="Ext.data.JsonReader" ext:member="#successProperty" href="output/Ext.data.JsonReader.html#successProperty">JsonReader</a></td>
73    </tr>
74        <tr class="config-row inherited alt expandable">
75        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
76        <td class="sig">
77        <a id="Ext.data.ArrayReader-totalProperty"></a>
78            <b>totalProperty</b> : String            <div class="mdesc">
79                        <div class="short">Name of the property from which to retrieve the total number of records in the dataset. This is only needed if the wh...</div>
80            <div class="long">
81                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.            </div>
82                        </div>
83        </td>
84        <td class="msource"><a ext:cls="Ext.data.JsonReader" ext:member="#totalProperty" href="output/Ext.data.JsonReader.html#totalProperty">JsonReader</a></td>
85    </tr>
86            </table>
87                <a id="Ext.data.ArrayReader-props"></a>
88        <h2>Public Properties</h2>
89                <table cellspacing="0" class="member-table">
90            <tr>
91                <th class="sig-header" colspan="2">Property</th>
92                <th class="msource-header">Defined By</th>
93            </tr>
94                <tr class="property-row inherited expandable">
95        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
96        <td class="sig">
97        <a id="Ext.data.ArrayReader-jsonData"></a>
98            <b>jsonData</b> : Object            <div class="mdesc">
99                        <div class="short">After any data loads, the raw JSON data is available for further custom processing.  If no data is
100loaded or there is...</div>
101            <div class="long">
102                After any data loads, the raw JSON data is available for further custom processing.  If no data is
103loaded or there is a load exception this property will be undefined.            </div>
104                        </div>
105        </td>
106        <td class="msource"><a ext:cls="Ext.data.JsonReader" ext:member="#jsonData" href="output/Ext.data.JsonReader.html#jsonData">JsonReader</a></td>
107    </tr>
108        <tr class="property-row inherited alt">
109        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
110        <td class="sig">
111        <a id="Ext.data.ArrayReader-meta"></a>
112            <b>meta</b> : Mixed            <div class="mdesc">
113                            This DataReader's configured metadata as passed to the constructor.                        </div>
114        </td>
115        <td class="msource"><a ext:cls="Ext.data.DataReader" ext:member="#meta" href="output/Ext.data.DataReader.html#meta">DataReader</a></td>
116    </tr>
117            </table>
118                <a id="Ext.data.ArrayReader-methods"></a>
119        <h2>Public Methods</h2>
120                <table cellspacing="0" class="member-table">
121            <tr>
122                <th class="sig-header" colspan="2">Method</th>
123                <th class="msource-header">Defined By</th>
124            </tr>
125                <tr class="method-row expandable">
126        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
127        <td class="sig">
128        <a id="Ext.data.ArrayReader-ArrayReader"></a>
129            <b>ArrayReader</b>(&nbsp;<code>Object meta</code>, <code>Object recordType</code>&nbsp;)            <div class="mdesc">
130                        <div class="short">Create a new ArrayReader</div>
131            <div class="long">
132                Create a new ArrayReader    <div class="mdetail-params">
133        <strong>Parameters:</strong>
134        <ul><li><code>meta</code> : Object<div class="sub-desc">Metadata configuration options.</div></li><li><code>recordType</code> : Object<div class="sub-desc">Either an Array of field definition objects
135as specified to <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>,
136or a <a ext:cls="Ext.data.Record" href="output/Ext.data.Record.html">Record</a> constructor
137created using <a ext:cls="Ext.data.Record" ext:member="create" href="output/Ext.data.Record.html#create">Ext.data.Record.create</a>.</div></li>        </ul>
138        <strong>Returns:</strong>
139        <ul>
140            <li><code></code></li>
141        </ul>
142    </div>
143                </div>
144                        </div>
145        </td>
146        <td class="msource">ArrayReader</td>
147    </tr>
148        <tr class="method-row inherited alt expandable">
149        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
150        <td class="sig">
151        <a id="Ext.data.ArrayReader-read"></a>
152            <b>read</b>(&nbsp;<code>Object response</code>&nbsp;) : Object            <div class="mdesc">
153                        <div class="short">
154This method is only used by a DataProxy which has retrieved data from a remote server.</div>
155            <div class="long">
156               
157This method is only used by a DataProxy which has retrieved data from a remote server.    <div class="mdetail-params">
158        <strong>Parameters:</strong>
159        <ul><li><code>response</code> : Object<div class="sub-desc">The XHR object which contains the JSON data in its responseText.</div></li>        </ul>
160        <strong>Returns:</strong>
161        <ul>
162            <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>
163        </ul>
164    </div>
165                </div>
166                        </div>
167        </td>
168        <td class="msource"><a ext:cls="Ext.data.JsonReader" ext:member="#read" href="output/Ext.data.JsonReader.html#read">JsonReader</a></td>
169    </tr>
170        <tr class="method-row expandable">
171        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
172        <td class="sig">
173        <a id="Ext.data.ArrayReader-readRecords"></a>
174            <b>readRecords</b>(&nbsp;<code>Object o</code>&nbsp;) : Object            <div class="mdesc">
175                        <div class="short">Create a data block containing Ext.data.Records from an Array.</div>
176            <div class="long">
177                Create a data block containing Ext.data.Records from an Array.    <div class="mdetail-params">
178        <strong>Parameters:</strong>
179        <ul><li><code>o</code> : Object<div class="sub-desc">An Array of row objects which represents the dataset.</div></li>        </ul>
180        <strong>Returns:</strong>
181        <ul>
182            <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>
183        </ul>
184    </div>
185                </div>
186                        </div>
187        </td>
188        <td class="msource">ArrayReader</td>
189    </tr>
190            </table>
191                <a id="Ext.data.ArrayReader-events"></a>
192        <h2>Public Events</h2>
193        <div class="no-members">This class has no public events.</div>
194        </div>
Note: See TracBrowser for help on using the repository browser.