Subversion Repositories eFlore/Applications.cel

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 aperonnet 1
        <div class="body-wrap">
2
        <div class="top-tools">
3
            <a class="inner-link" href="#Ext.data.DataProxy-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4
            <a class="inner-link" href="#Ext.data.DataProxy-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5
            <a class="inner-link" href="#Ext.data.DataProxy-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6
                            <a class="inner-link" href="#Ext.data.DataProxy-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.DataProxy"><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.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>
11
  <img src="resources/elbow-end.gif"/>DataProxy</pre></div>
12
                <h1>Class Ext.data.DataProxy</h1>
13
        <table cellspacing="0">
14
            <tr><td class="label">Package:</td><td class="hd-info">Ext.data</td></tr>
15
            <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/data/DataProxy.js" target="_blank">DataProxy.js</a></td></tr>
16
            <tr><td class="label">Class:</td><td class="hd-info">DataProxy</td></tr>
17
                        <tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.data.HttpProxy" href="output/Ext.data.HttpProxy.html">HttpProxy</a>, <a ext:cls="Ext.data.MemoryProxy" href="output/Ext.data.MemoryProxy.html">MemoryProxy</a>, <a ext:cls="Ext.data.ScriptTagProxy" href="output/Ext.data.ScriptTagProxy.html">ScriptTagProxy</a></td></tr>
18
                                    <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>
19
                    </table>
20
        <div class="description">
21
            This class is an abstract base class for implementations which provide retrieval of
22
unformatted data objects.<br>
23
<p>
24
DataProxy implementations are usually used in conjunction with an implementation of Ext.data.DataReader
25
(of the appropriate type which knows how to parse the data object) to provide a block of
26
<a ext:cls="Ext.data.Records" href="output/Ext.data.Records.html">Ext.data.Records</a> to an <a ext:cls="Ext.data.Store" href="output/Ext.data.Store.html">Ext.data.Store</a>.<br>
27
<p>
28
Custom implementations must implement the load method as described in
29
<a ext:cls="Ext.data.HttpProxy" ext:member="load" href="output/Ext.data.HttpProxy.html#load">Ext.data.HttpProxy.load</a>.        </div>
30
 
31
        <div class="hr"></div>
32
                <a id="Ext.data.DataProxy-configs"></a>
33
        <h2>Config Options</h2>
34
        <table cellspacing="0" class="member-table">
35
            <tr>
36
                <th class="sig-header" colspan="2">Config Options</th>
37
                <th class="msource-header">Defined By</th>
38
            </tr>
39
                <tr class="config-row inherited expandable">
40
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
41
        <td class="sig">
42
        <a id="Ext.data.DataProxy-listeners"></a>
43
            <b>listeners</b> : Object            <div class="mdesc">
44
                        <div class="short">A config object containing one or more event handlers to be added to this object during initialization. This should b...</div>
45
            <div class="long">
46
                A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once.            </div>
47
                        </div>
48
        </td>
49
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
50
    </tr>
51
            </table>
52
                <a id="Ext.data.DataProxy-props"></a>
53
        <h2>Public Properties</h2>
54
        <div class="no-members">This class has no public properties.</div>        <a id="Ext.data.DataProxy-methods"></a>
55
        <h2>Public Methods</h2>
56
                <table cellspacing="0" class="member-table">
57
            <tr>
58
                <th class="sig-header" colspan="2">Method</th>
59
                <th class="msource-header">Defined By</th>
60
            </tr>
61
                <tr class="method-row inherited expandable">
62
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
63
        <td class="sig">
64
        <a id="Ext.data.DataProxy-addEvents"></a>
65
            <b>addEvents</b>(&nbsp;<code>Object object</code>&nbsp;) : void            <div class="mdesc">
66
                        <div class="short">Used to define events on this Observable</div>
67
            <div class="long">
68
                Used to define events on this Observable    <div class="mdetail-params">
69
        <strong>Parameters:</strong>
70
        <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li>        </ul>
71
        <strong>Returns:</strong>
72
        <ul>
73
            <li><code>void</code></li>
74
        </ul>
75
    </div>
76
                </div>
77
                        </div>
78
        </td>
79
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
80
    </tr>
81
        <tr class="method-row inherited alt expandable">
82
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
83
        <td class="sig">
84
        <a id="Ext.data.DataProxy-addListener"></a>
85
            <b>addListener</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : void            <div class="mdesc">
86
                        <div class="short">Appends an event handler to this component</div>
87
            <div class="long">
88
                Appends an event handler to this component    <div class="mdetail-params">
89
        <strong>Parameters:</strong>
90
        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
91
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
92
properties. This may contain any of the following properties:<ul>
93
<li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li>
94
<li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li>
95
<li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li>
96
<li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayed
97
by the specified number of milliseconds. If the event fires again within that time, the original
98
handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
99
</ul><br>
100
<p>
101
<b>Combining Options</b><br>
102
Using the options argument, it is possible to combine different types of listeners:<br>
103
<br>
104
A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
105
<pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
106
    single: true,
107
    delay: 100,
108
    forumId: 4
109
});</code></pre>
110
<p>
111
<b>Attaching multiple handlers in 1 call</b><br>
112
The method also allows for a single argument to be passed which is a config object containing properties
113
which specify multiple handlers.
114
<p>
115
<pre><code>foo.on({
116
    <em>'click'</em> : {
117
        fn: <b>this</b>.onClick,
118
        scope: <b>this</b>,
119
        delay: 100
120
    },
121
    <em>'mouseover'</em> : {
122
        fn: <b>this</b>.onMouseOver,
123
        scope: <b>this</b>
124
    },
125
    <em>'mouseout'</em> : {
126
        fn: <b>this</b>.onMouseOut,
127
        scope: <b>this</b>
128
    }
129
});</code></pre>
130
<p>
131
Or a shorthand syntax:<br>
132
<pre><code>foo.on({
133
    <em>'click'</em> : <b>this</b>.onClick,
134
    <em>'mouseover'</em> : <b>this</b>.onMouseOver,
135
    <em>'mouseout'</em> : <b>this</b>.onMouseOut,
136
     scope: <b>this</b>
137
});</code></pre></div></li>        </ul>
138
        <strong>Returns:</strong>
139
        <ul>
140
            <li><code>void</code></li>
141
        </ul>
142
    </div>
143
                </div>
144
                        </div>
145
        </td>
146
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
147
    </tr>
148
        <tr class="method-row inherited expandable">
149
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
150
        <td class="sig">
151
        <a id="Ext.data.DataProxy-fireEvent"></a>
152
            <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean            <div class="mdesc">
153
                        <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
154
            <div class="long">
155
                Fires the specified event with the passed parameters (minus the event name).    <div class="mdetail-params">
156
        <strong>Parameters:</strong>
157
        <ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li>        </ul>
158
        <strong>Returns:</strong>
159
        <ul>
160
            <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
161
        </ul>
162
    </div>
163
                </div>
164
                        </div>
165
        </td>
166
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
167
    </tr>
168
        <tr class="method-row inherited alt expandable">
169
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
170
        <td class="sig">
171
        <a id="Ext.data.DataProxy-hasListener"></a>
172
            <b>hasListener</b>(&nbsp;<code>String eventName</code>&nbsp;) : Boolean            <div class="mdesc">
173
                        <div class="short">Checks to see if this object has any listeners for a specified event</div>
174
            <div class="long">
175
                Checks to see if this object has any listeners for a specified event    <div class="mdetail-params">
176
        <strong>Parameters:</strong>
177
        <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li>        </ul>
178
        <strong>Returns:</strong>
179
        <ul>
180
            <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
181
        </ul>
182
    </div>
183
                </div>
184
                        </div>
185
        </td>
186
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
187
    </tr>
188
        <tr class="method-row inherited expandable">
189
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
190
        <td class="sig">
191
        <a id="Ext.data.DataProxy-on"></a>
192
            <b>on</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : void            <div class="mdesc">
193
                        <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
194
            <div class="long">
195
                Appends an event handler to this element (shorthand for addListener)    <div class="mdetail-params">
196
        <strong>Parameters:</strong>
197
        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The method the event invokes</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope in which to execute the handler
198
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li>        </ul>
199
        <strong>Returns:</strong>
200
        <ul>
201
            <li><code>void</code></li>
202
        </ul>
203
    </div>
204
                </div>
205
                        </div>
206
        </td>
207
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
208
    </tr>
209
        <tr class="method-row inherited alt expandable">
210
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
211
        <td class="sig">
212
        <a id="Ext.data.DataProxy-purgeListeners"></a>
213
            <b>purgeListeners</b>() : void            <div class="mdesc">
214
                        <div class="short">Removes all listeners for this object</div>
215
            <div class="long">
216
                Removes all listeners for this object    <div class="mdetail-params">
217
        <strong>Parameters:</strong>
218
        <ul><li>None.</li>        </ul>
219
        <strong>Returns:</strong>
220
        <ul>
221
            <li><code>void</code></li>
222
        </ul>
223
    </div>
224
                </div>
225
                        </div>
226
        </td>
227
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
228
    </tr>
229
        <tr class="method-row inherited expandable">
230
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
231
        <td class="sig">
232
        <a id="Ext.data.DataProxy-removeListener"></a>
233
            <b>removeListener</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void            <div class="mdesc">
234
                        <div class="short">Removes a listener</div>
235
            <div class="long">
236
                Removes a listener    <div class="mdetail-params">
237
        <strong>Parameters:</strong>
238
        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li>        </ul>
239
        <strong>Returns:</strong>
240
        <ul>
241
            <li><code>void</code></li>
242
        </ul>
243
    </div>
244
                </div>
245
                        </div>
246
        </td>
247
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
248
    </tr>
249
        <tr class="method-row inherited alt expandable">
250
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
251
        <td class="sig">
252
        <a id="Ext.data.DataProxy-resumeEvents"></a>
253
            <b>resumeEvents</b>() : void            <div class="mdesc">
254
                        <div class="short">Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)</div>
255
            <div class="long">
256
                Resume firing events. (see <a ext:cls="Ext.util.Observable" ext:member="suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">suspendEvents</a>)    <div class="mdetail-params">
257
        <strong>Parameters:</strong>
258
        <ul><li>None.</li>        </ul>
259
        <strong>Returns:</strong>
260
        <ul>
261
            <li><code>void</code></li>
262
        </ul>
263
    </div>
264
                </div>
265
                        </div>
266
        </td>
267
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
268
    </tr>
269
        <tr class="method-row inherited expandable">
270
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
271
        <td class="sig">
272
        <a id="Ext.data.DataProxy-suspendEvents"></a>
273
            <b>suspendEvents</b>() : void            <div class="mdesc">
274
                        <div class="short">Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)</div>
275
            <div class="long">
276
                Suspend the firing of all events. (see <a ext:cls="Ext.util.Observable" ext:member="resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">resumeEvents</a>)    <div class="mdetail-params">
277
        <strong>Parameters:</strong>
278
        <ul><li>None.</li>        </ul>
279
        <strong>Returns:</strong>
280
        <ul>
281
            <li><code>void</code></li>
282
        </ul>
283
    </div>
284
                </div>
285
                        </div>
286
        </td>
287
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
288
    </tr>
289
        <tr class="method-row inherited alt expandable">
290
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
291
        <td class="sig">
292
        <a id="Ext.data.DataProxy-un"></a>
293
            <b>un</b>(&nbsp;<code>String eventName</code>, <code>Function handler</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>&nbsp;) : void            <div class="mdesc">
294
                        <div class="short">Removes a listener (shorthand for removeListener)</div>
295
            <div class="long">
296
                Removes a listener (shorthand for removeListener)    <div class="mdetail-params">
297
        <strong>Parameters:</strong>
298
        <ul><li><code>eventName</code> : String<div class="sub-desc">The type of event to listen for</div></li><li><code>handler</code> : Function<div class="sub-desc">The handler to remove</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope (this object) for the handler</div></li>        </ul>
299
        <strong>Returns:</strong>
300
        <ul>
301
            <li><code>void</code></li>
302
        </ul>
303
    </div>
304
                </div>
305
                        </div>
306
        </td>
307
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
308
    </tr>
309
            </table>
310
                <a id="Ext.data.DataProxy-events"></a>
311
        <h2>Public Events</h2>
312
                <table cellspacing="0" class="member-table">
313
            <tr>
314
                <th class="sig-header" colspan="2">Event</th>
315
                <th class="msource-header">Defined By</th>
316
            </tr>
317
                <tr class="event-row expandable">
318
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
319
        <td class="sig">
320
        <a id="Ext.data.DataProxy-beforeload"></a>
321
            <b>beforeload</b> : (&nbsp;<code>Object This</code>, <code>Object params</code>&nbsp;)            <div class="mdesc">
322
                        <div class="short">Fires before a network request is made to retrieve a data object.</div>
323
            <div class="long">
324
                Fires before a network request is made to retrieve a data object.    <div class="mdetail-params">
325
        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
326
        <ul><li><code>This</code> : Object<div class="sub-desc">DataProxy object.</div></li><li><code>params</code> : Object<div class="sub-desc">The params parameter to the load function.</div></li>        </ul>
327
    </div>
328
                </div>
329
                        </div>
330
        </td>
331
        <td class="msource">DataProxy</td>
332
    </tr>
333
        <tr class="event-row alt expandable">
334
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
335
        <td class="sig">
336
        <a id="Ext.data.DataProxy-load"></a>
337
            <b>load</b> : (&nbsp;<code>Object This</code>, <code>Object o</code>, <code>Object arg</code>&nbsp;)            <div class="mdesc">
338
                        <div class="short">Fires before the load method's callback is called.</div>
339
            <div class="long">
340
                Fires before the load method's callback is called.    <div class="mdetail-params">
341
        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
342
        <ul><li><code>This</code> : Object<div class="sub-desc">DataProxy object.</div></li><li><code>o</code> : Object<div class="sub-desc">The data object.</div></li><li><code>arg</code> : Object<div class="sub-desc">The callback argument object passed to the load function.</div></li>        </ul>
343
    </div>
344
                </div>
345
                        </div>
346
        </td>
347
        <td class="msource">DataProxy</td>
348
    </tr>
349
        <tr class="event-row expandable">
350
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
351
        <td class="sig">
352
        <a id="Ext.data.DataProxy-loadexception"></a>
353
            <b>loadexception</b> : (&nbsp;<code>Object This</code>, <code>Object o</code>, <code>Object arg</code>, <code>Object e</code>&nbsp;)            <div class="mdesc">
354
                        <div class="short">Fires if an Exception occurs during data retrieval.</div>
355
            <div class="long">
356
                Fires if an Exception occurs during data retrieval.    <div class="mdetail-params">
357
        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
358
        <ul><li><code>This</code> : Object<div class="sub-desc">DataProxy object.</div></li><li><code>o</code> : Object<div class="sub-desc">The data object.</div></li><li><code>arg</code> : Object<div class="sub-desc">The callback argument object passed to the load function.</div></li><li><code>e</code> : Object<div class="sub-desc">The Exception.</div></li>        </ul>
359
    </div>
360
                </div>
361
                        </div>
362
        </td>
363
        <td class="msource">DataProxy</td>
364
    </tr>
365
            </table>
366
 
367
        </div>