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.Updater-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
4
            <a class="inner-link" href="#Ext.Updater-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
5
            <a class="inner-link" href="#Ext.Updater-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
6
                            <a class="inner-link" href="#Ext.Updater-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
7
                        <a class="bookmark" href="../docs/?class=Ext.Updater"><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"/>Updater</pre></div>
12
                <h1>Class Ext.Updater</h1>
13
        <table cellspacing="0">
14
            <tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr>
15
            <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/core/UpdateManager.js" target="_blank">UpdateManager.js</a></td></tr>
16
            <tr><td class="label">Class:</td><td class="hd-info">Updater</td></tr>
17
                                    <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>
18
                    </table>
19
        <div class="description">
20
            Provides AJAX-style update for Element object.<br><br>
21
Usage:<br>
22
<pre><code><i>// Get it from a Ext.Element object</i>
23
<b>var</b> el = Ext.get(<em>"foo"</em>);
24
<b>var</b> mgr = el.getUpdater();
25
mgr.update({
26
url: <em>"http:<i>//myserver.com/index.php"</em>, </i>
27
params: {
28
param1: <em>"foo"</em>,
29
param2: <em>"bar"</em>
30
}
31
});
32
...
33
mgr.formUpdate(<em>"myFormId"</em>, <em>"http:<i>//myserver.com/index.php"</em>);</i>
34
<br>
35
<i>// or directly (returns the same Updater instance)</i>
36
<b>var</b> mgr = <b>new</b> Ext.Updater(<em>"myElementId"</em>);
37
mgr.startAutoRefresh(60, <em>"http:<i>//myserver.com/index.php"</em>);</i>
38
mgr.on(<em>"update"</em>, myFcnNeedsToKnow);
39
<br>
40
   <i>// short handed call directly from the element object</i>
41
   Ext.get(<em>"foo"</em>).load({
42
        url: <em>"bar.php"</em>,
43
        scripts: true,
44
        params: <em>"param1=foo&amp;param2=bar"</em>,
45
        text: <em>"Loading Foo..."</em>
46
   });</code></pre>        </div>
47
 
48
        <div class="hr"></div>
49
                <a id="Ext.Updater-configs"></a>
50
        <h2>Config Options</h2>
51
        <table cellspacing="0" class="member-table">
52
            <tr>
53
                <th class="sig-header" colspan="2">Config Options</th>
54
                <th class="msource-header">Defined By</th>
55
            </tr>
56
                <tr class="config-row inherited expandable">
57
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
58
        <td class="sig">
59
        <a id="Ext.Updater-listeners"></a>
60
            <b>listeners</b> : Object            <div class="mdesc">
61
                        <div class="short">A config object containing one or more event handlers to be added to this object during initialization. This should b...</div>
62
            <div class="long">
63
                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>
64
                        </div>
65
        </td>
66
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
67
    </tr>
68
            </table>
69
                <a id="Ext.Updater-props"></a>
70
        <h2>Public Properties</h2>
71
                <table cellspacing="0" class="member-table">
72
            <tr>
73
                <th class="sig-header" colspan="2">Property</th>
74
                <th class="msource-header">Defined By</th>
75
            </tr>
76
                <tr class="property-row">
77
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
78
        <td class="sig">
79
        <a id="Ext.Updater-defaultUrl"></a>
80
            <b>defaultUrl</b> : String            <div class="mdesc">
81
                            Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true.                        </div>
82
        </td>
83
        <td class="msource">Updater</td>
84
    </tr>
85
        <tr class="property-row alt expandable">
86
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
87
        <td class="sig">
88
        <a id="Ext.Updater-disableCaching"></a>
89
            <b>disableCaching</b> : Boolean            <div class="mdesc">
90
                        <div class="short">Whether to append unique parameter on get request to disable caching (Defaults to Ext.Updater.defaults.disableCaching...</div>
91
            <div class="long">
92
                Whether to append unique parameter on get request to disable caching (Defaults to Ext.Updater.defaults.disableCaching or false).            </div>
93
                        </div>
94
        </td>
95
        <td class="msource">Updater</td>
96
    </tr>
97
        <tr class="property-row">
98
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
99
        <td class="sig">
100
        <a id="Ext.Updater-el"></a>
101
            <b>el</b> : Ext.Element            <div class="mdesc">
102
                            The Element object                        </div>
103
        </td>
104
        <td class="msource">Updater</td>
105
    </tr>
106
        <tr class="property-row alt expandable">
107
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
108
        <td class="sig">
109
        <a id="Ext.Updater-formUpdateDelegate"></a>
110
            <b>formUpdateDelegate</b> : Function            <div class="mdesc">
111
                        <div class="short">Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arg...</div>
112
            <div class="long">
113
                Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments            </div>
114
                        </div>
115
        </td>
116
        <td class="msource">Updater</td>
117
    </tr>
118
        <tr class="property-row expandable">
119
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
120
        <td class="sig">
121
        <a id="Ext.Updater-indicatorText"></a>
122
            <b>indicatorText</b> : String            <div class="mdesc">
123
                        <div class="short">Text for loading indicator (Defaults to Ext.Updater.defaults.indicatorText or '&lt;div class="loading-indicator"&gt;L...</div>
124
            <div class="long">
125
                Text for loading indicator (Defaults to Ext.Updater.defaults.indicatorText or '&lt;div class="loading-indicator"&gt;Loading...&lt;/div&gt;').            </div>
126
                        </div>
127
        </td>
128
        <td class="msource">Updater</td>
129
    </tr>
130
        <tr class="property-row alt">
131
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
132
        <td class="sig">
133
        <a id="Ext.Updater-loadScripts"></a>
134
            <b>loadScripts</b> : Boolean            <div class="mdesc">
135
                            True to process scripts in the output (Defaults to Ext.Updater.defaults.loadScripts (false)).                        </div>
136
        </td>
137
        <td class="msource">Updater</td>
138
    </tr>
139
        <tr class="property-row">
140
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
141
        <td class="sig">
142
        <a id="Ext.Updater-refreshDelegate"></a>
143
            <b>refreshDelegate</b> : Function            <div class="mdesc">
144
                            Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments                        </div>
145
        </td>
146
        <td class="msource">Updater</td>
147
    </tr>
148
        <tr class="property-row alt">
149
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
150
        <td class="sig">
151
        <a id="Ext.Updater-renderer"></a>
152
            <b>renderer</b> : Object            <div class="mdesc">
153
                            The renderer for this Updater. Defaults to <a ext:cls="Ext.Updater.BasicRenderer" href="output/Ext.Updater.BasicRenderer.html">Ext.Updater.BasicRenderer</a>.                        </div>
154
        </td>
155
        <td class="msource">Updater</td>
156
    </tr>
157
        <tr class="property-row">
158
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
159
        <td class="sig">
160
        <a id="Ext.Updater-showLoadIndicator"></a>
161
            <b>showLoadIndicator</b> : String            <div class="mdesc">
162
                            Whether to show indicatorText when loading (Defaults to Ext.Updater.defaults.showLoadIndicator or true).                        </div>
163
        </td>
164
        <td class="msource">Updater</td>
165
    </tr>
166
        <tr class="property-row alt">
167
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
168
        <td class="sig">
169
        <a id="Ext.Updater-sslBlankUrl"></a>
170
            <b>sslBlankUrl</b> : String            <div class="mdesc">
171
                            Blank page URL to use with SSL file uploads (Defaults to Ext.Updater.defaults.sslBlankUrl or "about:blank").                        </div>
172
        </td>
173
        <td class="msource">Updater</td>
174
    </tr>
175
        <tr class="property-row">
176
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
177
        <td class="sig">
178
        <a id="Ext.Updater-timeout"></a>
179
            <b>timeout</b> : Number            <div class="mdesc">
180
                            Timeout for requests or form posts in seconds (Defaults to Ext.Updater.defaults.timeout or 30 seconds).                        </div>
181
        </td>
182
        <td class="msource">Updater</td>
183
    </tr>
184
        <tr class="property-row alt">
185
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
186
        <td class="sig">
187
        <a id="Ext.Updater-transaction"></a>
188
            <b>transaction</b> : Object            <div class="mdesc">
189
                            Transaction object of current executing transaction                        </div>
190
        </td>
191
        <td class="msource">Updater</td>
192
    </tr>
193
        <tr class="property-row">
194
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
195
        <td class="sig">
196
        <a id="Ext.Updater-updateDelegate"></a>
197
            <b>updateDelegate</b> : Function            <div class="mdesc">
198
                            Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments                        </div>
199
        </td>
200
        <td class="msource">Updater</td>
201
    </tr>
202
            </table>
203
                <a id="Ext.Updater-methods"></a>
204
        <h2>Public Methods</h2>
205
                <table cellspacing="0" class="member-table">
206
            <tr>
207
                <th class="sig-header" colspan="2">Method</th>
208
                <th class="msource-header">Defined By</th>
209
            </tr>
210
                <tr class="method-row expandable">
211
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
212
        <td class="sig">
213
        <a id="Ext.Updater-Updater"></a>
214
            <b>Updater</b>(&nbsp;<code>Mixed el</code>, <span class="optional" title="Optional">[<code>Boolean forceNew</code>]</span>&nbsp;)            <div class="mdesc">
215
                        <div class="short">Create new Updater directly.</div>
216
            <div class="long">
217
                Create new Updater directly.    <div class="mdetail-params">
218
        <strong>Parameters:</strong>
219
        <ul><li><code>el</code> : Mixed<div class="sub-desc">The element to update</div></li><li><code>forceNew</code> : Boolean<div class="sub-desc">(optional) By default the constructor checks to see if the passed element already has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class).</div></li>        </ul>
220
        <strong>Returns:</strong>
221
        <ul>
222
            <li><code></code></li>
223
        </ul>
224
    </div>
225
                </div>
226
                        </div>
227
        </td>
228
        <td class="msource">Updater</td>
229
    </tr>
230
        <tr class="method-row alt expandable">
231
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
232
        <td class="sig">
233
        <a id="Ext.Updater-Updater.updateElement"></a>
234
            <b>Updater.updateElement</b>(&nbsp;<code>Mixed el</code>, <code>String url</code>, <span class="optional" title="Optional">[<code>String/Object params</code>]</span>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : void            <div class="mdesc">
235
                        <div class="short">Deprecated. &lt;static&gt; Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ....</div>
236
            <div class="long">
237
                <b>Deprecated.</b> &lt;static&gt; Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
238
Usage:
239
<pre><code>Ext.Updater.updateElement(<em>"my-div"</em>, <em>"stuff.php"</em>);</code></pre>    <div class="mdetail-params">
240
        <strong>Parameters:</strong>
241
        <ul><li><code>el</code> : Mixed<div class="sub-desc">The element to update</div></li><li><code>url</code> : String<div class="sub-desc">The url</div></li><li><code>params</code> : String/Object<div class="sub-desc">(optional) Url encoded param string or an object of name/value pairs</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) A config object with any of the Updater properties you want to set - for example: {disableCaching:true, indicatorText: "Loading data..."}</div></li>        </ul>
242
        <strong>Returns:</strong>
243
        <ul>
244
            <li><code>void</code></li>
245
        </ul>
246
    </div>
247
                </div>
248
                        </div>
249
        </td>
250
        <td class="msource">Updater</td>
251
    </tr>
252
        <tr class="method-row expandable">
253
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
254
        <td class="sig">
255
        <a id="Ext.Updater-abort"></a>
256
            <b>abort</b>() : void            <div class="mdesc">
257
                        <div class="short">Aborts the executing transaction</div>
258
            <div class="long">
259
                Aborts the executing transaction    <div class="mdetail-params">
260
        <strong>Parameters:</strong>
261
        <ul><li>None.</li>        </ul>
262
        <strong>Returns:</strong>
263
        <ul>
264
            <li><code>void</code></li>
265
        </ul>
266
    </div>
267
                </div>
268
                        </div>
269
        </td>
270
        <td class="msource">Updater</td>
271
    </tr>
272
        <tr class="method-row inherited alt expandable">
273
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
274
        <td class="sig">
275
        <a id="Ext.Updater-addEvents"></a>
276
            <b>addEvents</b>(&nbsp;<code>Object object</code>&nbsp;) : void            <div class="mdesc">
277
                        <div class="short">Used to define events on this Observable</div>
278
            <div class="long">
279
                Used to define events on this Observable    <div class="mdetail-params">
280
        <strong>Parameters:</strong>
281
        <ul><li><code>object</code> : Object<div class="sub-desc">The object with the events defined</div></li>        </ul>
282
        <strong>Returns:</strong>
283
        <ul>
284
            <li><code>void</code></li>
285
        </ul>
286
    </div>
287
                </div>
288
                        </div>
289
        </td>
290
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addEvents" href="output/Ext.util.Observable.html#addEvents">Observable</a></td>
291
    </tr>
292
        <tr class="method-row inherited expandable">
293
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
294
        <td class="sig">
295
        <a id="Ext.Updater-addListener"></a>
296
            <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">
297
                        <div class="short">Appends an event handler to this component</div>
298
            <div class="long">
299
                Appends an event handler to this component    <div class="mdetail-params">
300
        <strong>Parameters:</strong>
301
        <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
302
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configuration
303
properties. This may contain any of the following properties:<ul>
304
<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>
305
<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>
306
<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>
307
<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
308
by the specified number of milliseconds. If the event fires again within that time, the original
309
handler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li>
310
</ul><br>
311
<p>
312
<b>Combining Options</b><br>
313
Using the options argument, it is possible to combine different types of listeners:<br>
314
<br>
315
A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)
316
<pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {
317
    single: true,
318
    delay: 100,
319
    forumId: 4
320
});</code></pre>
321
<p>
322
<b>Attaching multiple handlers in 1 call</b><br>
323
The method also allows for a single argument to be passed which is a config object containing properties
324
which specify multiple handlers.
325
<p>
326
<pre><code>foo.on({
327
    <em>'click'</em> : {
328
        fn: <b>this</b>.onClick,
329
        scope: <b>this</b>,
330
        delay: 100
331
    },
332
    <em>'mouseover'</em> : {
333
        fn: <b>this</b>.onMouseOver,
334
        scope: <b>this</b>
335
    },
336
    <em>'mouseout'</em> : {
337
        fn: <b>this</b>.onMouseOut,
338
        scope: <b>this</b>
339
    }
340
});</code></pre>
341
<p>
342
Or a shorthand syntax:<br>
343
<pre><code>foo.on({
344
    <em>'click'</em> : <b>this</b>.onClick,
345
    <em>'mouseover'</em> : <b>this</b>.onMouseOver,
346
    <em>'mouseout'</em> : <b>this</b>.onMouseOut,
347
     scope: <b>this</b>
348
});</code></pre></div></li>        </ul>
349
        <strong>Returns:</strong>
350
        <ul>
351
            <li><code>void</code></li>
352
        </ul>
353
    </div>
354
                </div>
355
                        </div>
356
        </td>
357
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
358
    </tr>
359
        <tr class="method-row inherited alt expandable">
360
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
361
        <td class="sig">
362
        <a id="Ext.Updater-fireEvent"></a>
363
            <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean            <div class="mdesc">
364
                        <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
365
            <div class="long">
366
                Fires the specified event with the passed parameters (minus the event name).    <div class="mdetail-params">
367
        <strong>Parameters:</strong>
368
        <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>
369
        <strong>Returns:</strong>
370
        <ul>
371
            <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
372
        </ul>
373
    </div>
374
                </div>
375
                        </div>
376
        </td>
377
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
378
    </tr>
379
        <tr class="method-row expandable">
380
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
381
        <td class="sig">
382
        <a id="Ext.Updater-formUpdate"></a>
383
            <b>formUpdate</b>(&nbsp;<code>String/HTMLElement form</code>, <span class="optional" title="Optional">[<code>String url</code>]</span>, <span class="optional" title="Optional">[<code>Boolean reset</code>]</span>, <span class="optional" title="Optional">[<code>Function callback</code>]</span>&nbsp;) : void            <div class="mdesc">
384
                        <div class="short">Performs an async form post, updating this element with the response. If the form has the attribute enctype="multipar...</div>
385
            <div class="long">
386
                Performs an async form post, updating this element with the response. If the form has the attribute enctype="multipart/form-data", it assumes it's a file upload.
387
Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.    <div class="mdetail-params">
388
        <strong>Parameters:</strong>
389
        <ul><li><code>form</code> : String/HTMLElement<div class="sub-desc">The form Id or form element</div></li><li><code>url</code> : String<div class="sub-desc">(optional) The url to pass the form to. If omitted the action attribute on the form will be used.</div></li><li><code>reset</code> : Boolean<div class="sub-desc">(optional) Whether to try to reset the form after the update</div></li><li><code>callback</code> : Function<div class="sub-desc">(optional) Callback when transaction is complete. The following
390
parameters are passed:<ul>
391
<li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
392
<li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
393
<li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li></ul></div></li>        </ul>
394
        <strong>Returns:</strong>
395
        <ul>
396
            <li><code>void</code></li>
397
        </ul>
398
    </div>
399
                </div>
400
                        </div>
401
        </td>
402
        <td class="msource">Updater</td>
403
    </tr>
404
        <tr class="method-row alt expandable">
405
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
406
        <td class="sig">
407
        <a id="Ext.Updater-getEl"></a>
408
            <b>getEl</b>() : Ext.Element            <div class="mdesc">
409
                        <div class="short">Get the Element this Updater is bound to</div>
410
            <div class="long">
411
                Get the Element this Updater is bound to    <div class="mdetail-params">
412
        <strong>Parameters:</strong>
413
        <ul><li>None.</li>        </ul>
414
        <strong>Returns:</strong>
415
        <ul>
416
            <li><code>Ext.Element</code><div class="sub-desc">The element</div></li>
417
        </ul>
418
    </div>
419
                </div>
420
                        </div>
421
        </td>
422
        <td class="msource">Updater</td>
423
    </tr>
424
        <tr class="method-row inherited expandable">
425
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
426
        <td class="sig">
427
        <a id="Ext.Updater-hasListener"></a>
428
            <b>hasListener</b>(&nbsp;<code>String eventName</code>&nbsp;) : Boolean            <div class="mdesc">
429
                        <div class="short">Checks to see if this object has any listeners for a specified event</div>
430
            <div class="long">
431
                Checks to see if this object has any listeners for a specified event    <div class="mdetail-params">
432
        <strong>Parameters:</strong>
433
        <ul><li><code>eventName</code> : String<div class="sub-desc">The name of the event to check for</div></li>        </ul>
434
        <strong>Returns:</strong>
435
        <ul>
436
            <li><code>Boolean</code><div class="sub-desc">True if the event is being listened for, else false</div></li>
437
        </ul>
438
    </div>
439
                </div>
440
                        </div>
441
        </td>
442
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#hasListener" href="output/Ext.util.Observable.html#hasListener">Observable</a></td>
443
    </tr>
444
        <tr class="method-row alt expandable">
445
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
446
        <td class="sig">
447
        <a id="Ext.Updater-isUpdating"></a>
448
            <b>isUpdating</b>() : Boolean            <div class="mdesc">
449
                        <div class="short">Returns true if an update is in progress</div>
450
            <div class="long">
451
                Returns true if an update is in progress    <div class="mdetail-params">
452
        <strong>Parameters:</strong>
453
        <ul><li>None.</li>        </ul>
454
        <strong>Returns:</strong>
455
        <ul>
456
            <li><code>Boolean</code></li>
457
        </ul>
458
    </div>
459
                </div>
460
                        </div>
461
        </td>
462
        <td class="msource">Updater</td>
463
    </tr>
464
        <tr class="method-row inherited expandable">
465
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
466
        <td class="sig">
467
        <a id="Ext.Updater-on"></a>
468
            <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">
469
                        <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
470
            <div class="long">
471
                Appends an event handler to this element (shorthand for addListener)    <div class="mdetail-params">
472
        <strong>Parameters:</strong>
473
        <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
474
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional)</div></li>        </ul>
475
        <strong>Returns:</strong>
476
        <ul>
477
            <li><code>void</code></li>
478
        </ul>
479
    </div>
480
                </div>
481
                        </div>
482
        </td>
483
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#on" href="output/Ext.util.Observable.html#on">Observable</a></td>
484
    </tr>
485
        <tr class="method-row inherited alt expandable">
486
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
487
        <td class="sig">
488
        <a id="Ext.Updater-purgeListeners"></a>
489
            <b>purgeListeners</b>() : void            <div class="mdesc">
490
                        <div class="short">Removes all listeners for this object</div>
491
            <div class="long">
492
                Removes all listeners for this object    <div class="mdetail-params">
493
        <strong>Parameters:</strong>
494
        <ul><li>None.</li>        </ul>
495
        <strong>Returns:</strong>
496
        <ul>
497
            <li><code>void</code></li>
498
        </ul>
499
    </div>
500
                </div>
501
                        </div>
502
        </td>
503
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#purgeListeners" href="output/Ext.util.Observable.html#purgeListeners">Observable</a></td>
504
    </tr>
505
        <tr class="method-row expandable">
506
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
507
        <td class="sig">
508
        <a id="Ext.Updater-refresh"></a>
509
            <b>refresh</b>(&nbsp;<span class="optional" title="Optional">[<code>Function callback</code>]</span>&nbsp;) : void            <div class="mdesc">
510
                        <div class="short">Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately</div>
511
            <div class="long">
512
                Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately    <div class="mdetail-params">
513
        <strong>Parameters:</strong>
514
        <ul><li><code>callback</code> : Function<div class="sub-desc">(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)</div></li>        </ul>
515
        <strong>Returns:</strong>
516
        <ul>
517
            <li><code>void</code></li>
518
        </ul>
519
    </div>
520
                </div>
521
                        </div>
522
        </td>
523
        <td class="msource">Updater</td>
524
    </tr>
525
        <tr class="method-row inherited alt expandable">
526
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
527
        <td class="sig">
528
        <a id="Ext.Updater-removeListener"></a>
529
            <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">
530
                        <div class="short">Removes a listener</div>
531
            <div class="long">
532
                Removes a listener    <div class="mdetail-params">
533
        <strong>Parameters:</strong>
534
        <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>
535
        <strong>Returns:</strong>
536
        <ul>
537
            <li><code>void</code></li>
538
        </ul>
539
    </div>
540
                </div>
541
                        </div>
542
        </td>
543
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#removeListener" href="output/Ext.util.Observable.html#removeListener">Observable</a></td>
544
    </tr>
545
        <tr class="method-row inherited expandable">
546
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
547
        <td class="sig">
548
        <a id="Ext.Updater-resumeEvents"></a>
549
            <b>resumeEvents</b>() : void            <div class="mdesc">
550
                        <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>
551
            <div class="long">
552
                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">
553
        <strong>Parameters:</strong>
554
        <ul><li>None.</li>        </ul>
555
        <strong>Returns:</strong>
556
        <ul>
557
            <li><code>void</code></li>
558
        </ul>
559
    </div>
560
                </div>
561
                        </div>
562
        </td>
563
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#resumeEvents" href="output/Ext.util.Observable.html#resumeEvents">Observable</a></td>
564
    </tr>
565
        <tr class="method-row alt expandable">
566
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
567
        <td class="sig">
568
        <a id="Ext.Updater-setDefaultUrl"></a>
569
            <b>setDefaultUrl</b>(&nbsp;<code>String/Function defaultUrl</code>&nbsp;) : void            <div class="mdesc">
570
                        <div class="short">Set the defaultUrl used for updates</div>
571
            <div class="long">
572
                Set the defaultUrl used for updates    <div class="mdetail-params">
573
        <strong>Parameters:</strong>
574
        <ul><li><code>defaultUrl</code> : String/Function<div class="sub-desc">The url or a function to call to get the url</div></li>        </ul>
575
        <strong>Returns:</strong>
576
        <ul>
577
            <li><code>void</code></li>
578
        </ul>
579
    </div>
580
                </div>
581
                        </div>
582
        </td>
583
        <td class="msource">Updater</td>
584
    </tr>
585
        <tr class="method-row expandable">
586
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
587
        <td class="sig">
588
        <a id="Ext.Updater-setRenderer"></a>
589
            <b>setRenderer</b>(&nbsp;<code>Object renderer</code>&nbsp;) : void            <div class="mdesc">
590
                        <div class="short">Set the content renderer for this Updater. See <a ext:cls="Ext.Updater.BasicRenderer" ext:member="render" href="output/Ext.Updater.BasicRenderer.html#render">Ext.Updater.BasicRenderer.render</a> for more details.</div>
591
            <div class="long">
592
                Set the content renderer for this Updater. See <a ext:cls="Ext.Updater.BasicRenderer" ext:member="render" href="output/Ext.Updater.BasicRenderer.html#render">Ext.Updater.BasicRenderer.render</a> for more details.    <div class="mdetail-params">
593
        <strong>Parameters:</strong>
594
        <ul><li><code>renderer</code> : Object<div class="sub-desc">The object implementing the render() method</div></li>        </ul>
595
        <strong>Returns:</strong>
596
        <ul>
597
            <li><code>void</code></li>
598
        </ul>
599
    </div>
600
                </div>
601
                        </div>
602
        </td>
603
        <td class="msource">Updater</td>
604
    </tr>
605
        <tr class="method-row alt expandable">
606
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
607
        <td class="sig">
608
        <a id="Ext.Updater-showLoading"></a>
609
            <b>showLoading</b>() : void            <div class="mdesc">
610
                        <div class="short">Called to update the element to "Loading" state. Override to perform custom action.</div>
611
            <div class="long">
612
                Called to update the element to "Loading" state. Override to perform custom action.    <div class="mdetail-params">
613
        <strong>Parameters:</strong>
614
        <ul><li>None.</li>        </ul>
615
        <strong>Returns:</strong>
616
        <ul>
617
            <li><code>void</code></li>
618
        </ul>
619
    </div>
620
                </div>
621
                        </div>
622
        </td>
623
        <td class="msource">Updater</td>
624
    </tr>
625
        <tr class="method-row expandable">
626
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
627
        <td class="sig">
628
        <a id="Ext.Updater-startAutoRefresh"></a>
629
            <b>startAutoRefresh</b>(&nbsp;<code>Number interval</code>, <span class="optional" title="Optional">[<code>String/Function url</code>]</span>, <span class="optional" title="Optional">[<code>String/Object params</code>]</span>, <span class="optional" title="Optional">[<code>Function callback</code>]</span>, <span class="optional" title="Optional">[<code>Boolean refreshNow</code>]</span>&nbsp;) : void            <div class="mdesc">
630
                        <div class="short">Set this element to auto refresh.</div>
631
            <div class="long">
632
                Set this element to auto refresh.    <div class="mdetail-params">
633
        <strong>Parameters:</strong>
634
        <ul><li><code>interval</code> : Number<div class="sub-desc">How often to update (in seconds).</div></li><li><code>url</code> : String/Function<div class="sub-desc">(optional) The url for this request or a function to call to get the url (Defaults to the last used url)</div></li><li><code>params</code> : String/Object<div class="sub-desc">(optional) The parameters to pass as either a url encoded string "&param1=1&param2=2" or as an object {param1: 1, param2: 2}</div></li><li><code>callback</code> : Function<div class="sub-desc">(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)</div></li><li><code>refreshNow</code> : Boolean<div class="sub-desc">(optional) Whether to execute the refresh now, or wait the interval</div></li>        </ul>
635
        <strong>Returns:</strong>
636
        <ul>
637
            <li><code>void</code></li>
638
        </ul>
639
    </div>
640
                </div>
641
                        </div>
642
        </td>
643
        <td class="msource">Updater</td>
644
    </tr>
645
        <tr class="method-row alt expandable">
646
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
647
        <td class="sig">
648
        <a id="Ext.Updater-stopAutoRefresh"></a>
649
            <b>stopAutoRefresh</b>() : void            <div class="mdesc">
650
                        <div class="short">Stop auto refresh on this element.</div>
651
            <div class="long">
652
                Stop auto refresh on this element.    <div class="mdetail-params">
653
        <strong>Parameters:</strong>
654
        <ul><li>None.</li>        </ul>
655
        <strong>Returns:</strong>
656
        <ul>
657
            <li><code>void</code></li>
658
        </ul>
659
    </div>
660
                </div>
661
                        </div>
662
        </td>
663
        <td class="msource">Updater</td>
664
    </tr>
665
        <tr class="method-row inherited expandable">
666
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
667
        <td class="sig">
668
        <a id="Ext.Updater-suspendEvents"></a>
669
            <b>suspendEvents</b>() : void            <div class="mdesc">
670
                        <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>
671
            <div class="long">
672
                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">
673
        <strong>Parameters:</strong>
674
        <ul><li>None.</li>        </ul>
675
        <strong>Returns:</strong>
676
        <ul>
677
            <li><code>void</code></li>
678
        </ul>
679
    </div>
680
                </div>
681
                        </div>
682
        </td>
683
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#suspendEvents" href="output/Ext.util.Observable.html#suspendEvents">Observable</a></td>
684
    </tr>
685
        <tr class="method-row inherited alt expandable">
686
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
687
        <td class="sig">
688
        <a id="Ext.Updater-un"></a>
689
            <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">
690
                        <div class="short">Removes a listener (shorthand for removeListener)</div>
691
            <div class="long">
692
                Removes a listener (shorthand for removeListener)    <div class="mdetail-params">
693
        <strong>Parameters:</strong>
694
        <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>
695
        <strong>Returns:</strong>
696
        <ul>
697
            <li><code>void</code></li>
698
        </ul>
699
    </div>
700
                </div>
701
                        </div>
702
        </td>
703
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#un" href="output/Ext.util.Observable.html#un">Observable</a></td>
704
    </tr>
705
        <tr class="method-row expandable">
706
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
707
        <td class="sig">
708
        <a id="Ext.Updater-update"></a>
709
            <b>update</b>(&nbsp;<code>Object options</code>&nbsp;) : void            <div class="mdesc">
710
                        <div class="short">Performs an asynchronous request, updating this element with the response.
711
If params are specified it uses POST, othe...</div>
712
            <div class="long">
713
                Performs an <b>asynchronous</b> request, updating this element with the response.
714
If params are specified it uses POST, otherwise it uses GET.<br><br>
715
<b>NB:</b> Due to the asynchronous nature of remote server requests, the Element
716
will not have been fully updated when the function returns. To postprocess the returned
717
data, use the callback option, or an <b><tt>update</tt></b> event handler.    <div class="mdetail-params">
718
        <strong>Parameters:</strong>
719
        <ul><li><code>options</code> : Object<div class="sub-desc">A config object containing any of the following options:<ul>
720
<li>url : <b>String/Function</b><p class="sub-desc">The URL to
721
request or a function which <i>returns</i> the URL.</p></li>
722
<li>method : <b>String</b><p class="sub-desc">The HTTP method to
723
use. Defaults to POST if params are present, or GET if not.</p></li>
724
<li>params : <b>String/Object/Function</b><p class="sub-desc">The
725
parameters to pass to the server. These may be specified as a urlencoded
726
string, or as an object containing properties which represent parameters,
727
or as a function, which returns an object.</p></li>
728
<li>scripts : <b>Boolean</b><p class="sub-desc">If <tt>true</tt>
729
any &lt;script&gt; tags embedded in the response text will be extracted
730
and executed. If this option is specified, the callback will be
731
called <i>after</i> the execution of the scripts.</p></li>
732
<li>callback : <b>Function</b><p class="sub-desc">A function to
733
be called when the response from the server arrives. The following
734
parameters are passed:<ul>
735
<li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li>
736
<li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li>
737
<li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li>
738
<li><b>options</b> : Object<p class="sub-desc">The config object passed to the update call.</p></li></ul>
739
</p></li>
740
<li>scope : <b>Object</b><p class="sub-desc">The scope in which
741
to execute the callback (The callback's <tt>this</tt> reference.) If the
742
<tt>params</tt> option is a function, this scope is used for that function also.</p></li>
743
<li>discardUrl : <b>Boolean</b><p class="sub-desc">If not passed
744
as <tt>false</tt> the URL of this request becomes the default URL for
745
this Updater object, and will be subsequently used in <a ext:cls="Ext.Updater" ext:member="refresh" href="output/Ext.Updater.html#refresh">refresh</a>
746
calls.</p></li>
747
<li>timeout : <b>Number</b><p class="sub-desc">The timeout to use
748
when waiting for a response.</p></li>
749
<li>nocache : <b>Boolean</b><p class="sub-desc">Only needed for GET
750
requests, this option causes an extra, generated parameter to be passed
751
to defeat caching.</p></li></ul>
752
<p>
753
For example:
754
<pre><code>um.update({
755
    url: <em>"your-url.php"</em>,
756
    params: {param1: <em>"foo"</em>, param2: <em>"bar"</em>}, <i>// or a URL encoded string</i>
757
    callback: yourFunction,
758
    scope: yourObject, <i>//(optional scope)  </i>
759
    discardUrl: false,
760
    nocache: false,
761
    text: <em>"Loading..."</em>,
762
    timeout: 30,
763
    scripts: false <i>// Save time by avoiding RegExp execution.</i>
764
});</code></pre></div></li>        </ul>
765
        <strong>Returns:</strong>
766
        <ul>
767
            <li><code>void</code></li>
768
        </ul>
769
    </div>
770
                </div>
771
                        </div>
772
        </td>
773
        <td class="msource">Updater</td>
774
    </tr>
775
            </table>
776
                <a id="Ext.Updater-events"></a>
777
        <h2>Public Events</h2>
778
                <table cellspacing="0" class="member-table">
779
            <tr>
780
                <th class="sig-header" colspan="2">Event</th>
781
                <th class="msource-header">Defined By</th>
782
            </tr>
783
                <tr class="event-row expandable">
784
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
785
        <td class="sig">
786
        <a id="Ext.Updater-beforeupdate"></a>
787
            <b>beforeupdate</b> : (&nbsp;<code>Ext.Element el</code>, <code>String/Object/Function url</code>, <code>String/Object params</code>&nbsp;)            <div class="mdesc">
788
                        <div class="short">Fired before an update is made, return false from your handler and the update is cancelled.</div>
789
            <div class="long">
790
                Fired before an update is made, return false from your handler and the update is cancelled.    <div class="mdetail-params">
791
        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
792
        <ul><li><code>el</code> : Ext.Element<div class="sub-desc"></div></li><li><code>url</code> : String/Object/Function<div class="sub-desc"></div></li><li><code>params</code> : String/Object<div class="sub-desc"></div></li>        </ul>
793
    </div>
794
                </div>
795
                        </div>
796
        </td>
797
        <td class="msource">Updater</td>
798
    </tr>
799
        <tr class="event-row alt expandable">
800
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
801
        <td class="sig">
802
        <a id="Ext.Updater-failure"></a>
803
            <b>failure</b> : (&nbsp;<code>Ext.Element el</code>, <code>Object oResponseObject</code>&nbsp;)            <div class="mdesc">
804
                        <div class="short">Fired on update failure.</div>
805
            <div class="long">
806
                Fired on update failure.    <div class="mdetail-params">
807
        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
808
        <ul><li><code>el</code> : Ext.Element<div class="sub-desc"></div></li><li><code>oResponseObject</code> : Object<div class="sub-desc">The response Object</div></li>        </ul>
809
    </div>
810
                </div>
811
                        </div>
812
        </td>
813
        <td class="msource">Updater</td>
814
    </tr>
815
        <tr class="event-row expandable">
816
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
817
        <td class="sig">
818
        <a id="Ext.Updater-update"></a>
819
            <b>update</b> : (&nbsp;<code>Ext.Element el</code>, <code>Object oResponseObject</code>&nbsp;)            <div class="mdesc">
820
                        <div class="short">Fired after successful update is made.</div>
821
            <div class="long">
822
                Fired after successful update is made.    <div class="mdetail-params">
823
        <strong style="font-weight:normal;">Listeners will be called with the following arguments:</strong>
824
        <ul><li><code>el</code> : Ext.Element<div class="sub-desc"></div></li><li><code>oResponseObject</code> : Object<div class="sub-desc">The response Object</div></li>        </ul>
825
    </div>
826
                </div>
827
                        </div>
828
        </td>
829
        <td class="msource">Updater</td>
830
    </tr>
831
            </table>
832
 
833
        </div>