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