Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / docs / api / Ext.data.proxy.Ajax.html
1 <!DOCTYPE html><html><head><title>Ext.data.proxy.Ajax | Ext JS 4.0 Documentation</title><script type="text/javascript" src="../ext-all.js"></script><link rel="stylesheet" href="../reset.css" type="text/css"><link rel="stylesheet" href="../scrollbars.css" type="text/css"><link rel="stylesheet" href="../docs.css" type="text/css"><link id="styleCss" rel="stylesheet" href="../style.css" type="text/css"><script type="text/javascript" src="../prettify.js"></script><link rel="stylesheet" href="../prettify.css" type="text/css"><!-- link(rel: 'stylesheet', href: req.baseURL + '/css/ext4.css', type: 'text/css')--><link rel="shortcut icon" type="image/ico" href="../favicon.ico"><!--[if IE]>
2 <style type="text/css">.head-band { display: none; }
3 .header { border: 0; top: 0; left: 0px; background: url(../header.gif) repeat-x; }
4 .doc-tab .members .member a.more { background-color: #efefef; }
5 </style><link rel="stylesheet" href="/new/css/ie.css" type="text/css"><![endif]-->
6 </head><body id="ext-body" class="iScroll"><div id="notice" class="notice">For up to date documentation and features, visit 
7 <a href="http://docs.sencha.com/ext-js/4-0">http://docs.sencha.com/ext-js/4-0</a></div><div class="wrapper"><div class="head-band"></div><div class="header"><h2><a href="../index.html">Sencha Documentation</a></h2></div><div id="search"><form><input type="text" placeholder="Search" id="search-field" autocomplete="off" name="q"></form><div id="search-box"></div></div><div id="treePanel"></div><div id="container"><script type="text/javascript">
8
9     req = {
10         liveURL: '.',
11         standAloneMode: true,
12         origDocClass: 'Ext.data.proxy.Ajax',
13         docClass: 'Ext.data.proxy.Ajax',
14         docReq: 'Ext.data.proxy.Ajax',
15         version: '4.0',
16         baseURL: '.',
17         baseDocURL: '.',
18         baseProdURL: '.'
19     };
20
21     clsInfo = {};
22
23
24
25 </script>
26
27 <script type="text/javascript" src="../search.js"></script>
28 <!--script type="text/javascript" src="/new/javascripts/app/examples.js"></script-->
29 <script type="text/javascript" src="../class_tree.js"></script>
30 <script type="text/javascript" src="../class_doc.js"></script>
31 <script type="text/javascript">
32     req.source = 'Ajax2.html#Ext-data.proxy.Ajax';
33     clsInfo = {"methods":["Ajax","addEvents","addListener","addManagedListener","batch","buildRequest","buildUrl","capture","clearListeners","clearManagedListeners","doRequest","enableBubble","encodeFilters","encodeSorters","fireEvent","getMethod","getModel","getReader","getWriter","hasListener","observe","on","processResponse","relayEvents","releaseCapture","removeListener","removeManagedListener","resumeEvents","setModel","setReader","setWriter","suspendEvents","un"],"cfgs":["api","batchActions","batchOrder","cacheString","directionParam","extraParams","filterParam","groupParam","headers","limitParam","listeners","model","noCache","pageParam","reader","simpleSortMode","sortParam","startParam","timeout","url","writer"],"properties":["actionMethods","afterRequest","create","destroy","read","update"],"events":["exception"],"subclasses":["Ext.data.proxy.Rest"]};
34     Ext.onReady(function() {
35         Ext.create('Docs.classPanel');
36     });
37 </script><div id="top-block" class="top-block"><h1 id="clsTitle" class="cls"><a href="../source/Ajax2.html#Ext-data.proxy.Ajax" target="_blank">Ext.data.proxy.Ajax</a></h1></div><div id="docContent"><div id="doc-overview-content"><div class="lft"><pre class="subclasses"><h4>Hierarchy</h4><div class="subclass f"><a href="Ext.data.proxy.Proxy.html" rel="Ext.data.proxy.Proxy" class="cls docClass">Ext.data.proxy.Proxy</a><div class="subclass"><a href="Ext.data.proxy.Server.html" rel="Ext.data.proxy.Server" class="cls docClass">Ext.data.proxy.Server</a><div class="subclass"><strong>Ext.data.proxy.Ajax</strong></div></div></div><h4>Mixins</h4><div class="mixin"><a href="Ext.util.Observable.html" rel="Ext.util.Observable" class="cls docClass">Ext.util.Observable</a></div></pre><p>AjaxProxy is one of the most widely-used ways of getting data into your application. It uses AJAX requests to 
38 load data from the server, usually to be placed into a <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Store</a>. Let's take a look at a typical
39 setup. Here we're going to set up a Store that has an AjaxProxy. To prepare, we'll also set up a 
40 <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a>:</p>
41
42
43
44
45 <pre class="prettyprint"><code>Ext.define('User', {
46     extend: 'Ext.data.Model',
47     fields: ['id', 'name', 'email']
48 });
49
50 //The Store contains the AjaxProxy as an inline configuration
51 var store = new Ext.data.Store({
52     model: 'User',
53     proxy: {
54         type: 'ajax',
55         url : 'users.json'
56     }
57 });
58
59 store.load();
60 </code></pre>
61
62
63
64
65 <p>Our example is going to load user data into a Store, so we start off by defining a <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a>
66 with the fields that we expect the server to return. Next we set up the Store itself, along with a <a href="Ext.data.proxy.Ajax.html#proxy" rel="Ext.data.proxy.Ajax#proxy" class="docClass">proxy</a>
67 configuration. This configuration was automatically turned into an <a href="Ext.data.proxy.Ajax.html" rel="Ext.data.proxy.Ajax" class="docClass">Ext.data.proxy.Ajax</a> instance, with the url we
68 specified being passed into AjaxProxy's constructor. It's as if we'd done this:</p>
69
70
71
72
73 <pre class="prettyprint"><code>new Ext.data.proxy.Ajax({
74     url: 'users.json',
75     model: 'User',
76     reader: 'json'
77 });
78 </code></pre>
79
80
81
82
83 <p>A couple of extra configurations appeared here - <a href="Ext.data.proxy.Ajax.html#model" rel="Ext.data.proxy.Ajax#model" class="docClass">model</a> and <a href="Ext.data.proxy.Ajax.html#reader" rel="Ext.data.proxy.Ajax#reader" class="docClass">reader</a>. These are set by default 
84 when we create the proxy via the Store - the Store already knows about the Model, and Proxy's default 
85 <a href="Ext.data.reader.Reader.html" rel="Ext.data.reader.Reader" class="docClass">Reader</a> is <a href="Ext.data.reader.Json.html" rel="Ext.data.reader.Json" class="docClass">JsonReader</a>.</p>
86
87
88
89
90 <p>Now when we call store.load(), the AjaxProxy springs into action, making a request to the url we configured
91 ('users.json' in this case). As we're performing a read, it sends a GET request to that url (see <a href="Ext.data.proxy.Ajax.html#actionMethods" rel="Ext.data.proxy.Ajax#actionMethods" class="docClass">actionMethods</a>
92 to customize this - by default any kind of read will be sent as a GET request and any kind of write will be sent as a
93 POST request).</p>
94
95
96
97
98 <p><u>Limitations</u></p>
99
100
101
102
103 <p>AjaxProxy cannot be used to retrieve data from other domains. If your application is running on http://domainA.com
104 it cannot load data from http://domainB.com because browsers have a built-in security policy that prohibits domains
105 talking to each other via AJAX.</p>
106
107
108
109
110 <p>If you need to read data from another domain and can't set up a proxy server (some software that runs on your own
111 domain's web server and transparently forwards requests to http://domainB.com, making it look like they actually came
112 from http://domainA.com), you can use <a href="Ext.data.proxy.JsonP.html" rel="Ext.data.proxy.JsonP" class="docClass">Ext.data.proxy.JsonP</a> and a technique known as JSON-P (JSON with 
113 Padding), which can help you get around the problem so long as the server on http://domainB.com is set up to support
114 JSON-P responses. See <a href="Ext.data.proxy.JsonP.html" rel="Ext.data.proxy.JsonP" class="docClass">JsonPProxy</a>'s introduction docs for more details.</p>
115
116
117
118
119 <p><u>Readers and Writers</u></p>
120
121
122
123
124 <p>AjaxProxy can be configured to use any type of <a href="Ext.data.reader.Reader.html" rel="Ext.data.reader.Reader" class="docClass">Reader</a> to decode the server's response. If
125 no Reader is supplied, AjaxProxy will default to using a <a href="Ext.data.reader.Json.html" rel="Ext.data.reader.Json" class="docClass">JsonReader</a>. Reader configuration
126 can be passed in as a simple object, which the Proxy automatically turns into a <a href="Ext.data.reader.Reader.html" rel="Ext.data.reader.Reader" class="docClass">Reader</a>
127 instance:</p>
128
129
130
131
132 <pre class="prettyprint"><code>var proxy = new Ext.data.proxy.Ajax({
133     model: 'User',
134     reader: {
135         type: 'xml',
136         root: 'users'
137     }
138 });
139
140 proxy.getReader(); //returns an <a href="Ext.data.reader.Xml.html" rel="Ext.data.reader.Xml" class="docClass">XmlReader</a> instance based on the config we supplied
141 </code></pre>
142
143
144
145
146 <p><u>Url generation</u></p>
147
148
149
150
151 <p>AjaxProxy automatically inserts any sorting, filtering, paging and grouping options into the url it generates for
152 each request. These are controlled with the following configuration options:</p>
153
154
155
156
157 <ul style="list-style-type: disc; padding-left: 20px;">
158     <li><a href="Ext.data.proxy.Ajax.html#pageParam" rel="Ext.data.proxy.Ajax#pageParam" class="docClass">pageParam</a> - controls how the page number is sent to the server 
159     (see also <a href="Ext.data.proxy.Ajax.html#startParam" rel="Ext.data.proxy.Ajax#startParam" class="docClass">startParam</a> and <a href="Ext.data.proxy.Ajax.html#limitParam" rel="Ext.data.proxy.Ajax#limitParam" class="docClass">limitParam</a>)</li>
160     <li><a href="Ext.data.proxy.Ajax.html#sortParam" rel="Ext.data.proxy.Ajax#sortParam" class="docClass">sortParam</a> - controls how sort information is sent to the server</li>
161     <li><a href="Ext.data.proxy.Ajax.html#groupParam" rel="Ext.data.proxy.Ajax#groupParam" class="docClass">groupParam</a> - controls how grouping information is sent to the server</li>
162     <li><a href="Ext.data.proxy.Ajax.html#filterParam" rel="Ext.data.proxy.Ajax#filterParam" class="docClass">filterParam</a> - controls how filter information is sent to the server</li>
163 </ul>
164
165
166
167
168 <p>Each request sent by AjaxProxy is described by an <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">Operation</a>. To see how we can 
169 customize the generated urls, let's say we're loading the Proxy with the following Operation:</p>
170
171
172
173
174 <pre class="prettyprint"><code>var operation = new Ext.data.Operation({
175     action: 'read',
176     page  : 2
177 });
178 </code></pre>
179
180
181
182
183 <p>Now we'll issue the request for this Operation by calling <a href="Ext.data.proxy.Ajax.html#read" rel="Ext.data.proxy.Ajax#read" class="docClass">read</a>:</p>
184
185
186
187
188 <pre class="prettyprint"><code>var proxy = new Ext.data.proxy.Ajax({
189     url: '/users'
190 });
191
192 proxy.read(operation); //GET /users?page=2
193 </code></pre>
194
195
196
197
198 <p>Easy enough - the Proxy just copied the page property from the Operation. We can customize how this page data is
199 sent to the server:</p>
200
201
202
203
204 <pre class="prettyprint"><code>var proxy = new Ext.data.proxy.Ajax({
205     url: '/users',
206     pagePage: 'pageNumber'
207 });
208
209 proxy.read(operation); //GET /users?pageNumber=2
210 </code></pre>
211
212
213
214
215 <p>Alternatively, our Operation could have been configured to send start and limit parameters instead of page:</p>
216
217
218
219
220 <pre class="prettyprint"><code>var operation = new Ext.data.Operation({
221     action: 'read',
222     start : 50,
223     limit : 25
224 });
225
226 var proxy = new Ext.data.proxy.Ajax({
227     url: '/users'
228 });
229
230 proxy.read(operation); //GET /users?start=50&limit=25
231 </code></pre>
232
233
234
235
236 <p>Again we can customize this url:</p>
237
238
239
240
241 <pre class="prettyprint"><code>var proxy = new Ext.data.proxy.Ajax({
242     url: '/users',
243     startParam: 'startIndex',
244     limitParam: 'limitIndex'
245 });
246
247 proxy.read(operation); //GET /users?startIndex=50&limitIndex=25
248 </code></pre>
249
250
251
252
253 <p>AjaxProxy will also send sort and filter information to the server. Let's take a look at how this looks with a
254 more expressive Operation object:</p>
255
256
257
258
259 <pre class="prettyprint"><code>var operation = new Ext.data.Operation({
260     action: 'read',
261     sorters: [
262         new Ext.util.Sorter({
263             property : 'name',
264             direction: 'ASC'
265         }),
266         new Ext.util.Sorter({
267             property : 'age',
268             direction: 'DESC'
269         })
270     ],
271     filters: [
272         new Ext.util.Filter({
273             property: 'eyeColor',
274             value   : 'brown'
275         })
276     ]
277 });
278 </code></pre>
279
280
281
282
283 <p>This is the type of object that is generated internally when loading a <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Store</a> with sorters
284 and filters defined. By default the AjaxProxy will JSON encode the sorters and filters, resulting in something like
285 this (note that the url is escaped before sending the request, but is left unescaped here for clarity):</p>
286
287
288
289
290 <pre class="prettyprint"><code>var proxy = new Ext.data.proxy.Ajax({
291     url: '/users'
292 });
293
294 proxy.read(operation); //GET /users?sort=[{"property":"name","direction":"ASC"},{"property":"age","direction":"DESC"}]&filter=[{"property":"eyeColor","value":"brown"}]
295 </code></pre>
296
297
298
299
300 <p>We can again customize how this is created by supplying a few configuration options. Let's say our server is set 
301 up to receive sorting information is a format like "sortBy=name#ASC,age#DESC". We can configure AjaxProxy to provide
302 that format like this:</p>
303
304
305
306
307 <pre class="prettyprint"><code> var proxy = new Ext.data.proxy.Ajax({
308      url: '/users',
309      sortParam: 'sortBy',
310      filterParam: 'filterBy',
311
312      //our custom implementation of sorter encoding - turns our sorters into "name#ASC,age#DESC"
313      encodeSorters: function(sorters) {
314          var length   = sorters.length,
315              sortStrs = [],
316              sorter, i;
317
318          for (i = 0; i < length; i++) {
319              sorter = sorters[i];
320
321              sortStrs[i] = sorter.property + '#' + sorter.direction
322          }
323
324          return sortStrs.join(",");
325      }
326  });
327
328  proxy.read(operation); //GET /users?sortBy=name#ASC,age#DESC&filterBy=[{"property":"eyeColor","value":"brown"}]
329  </code></pre>
330
331
332
333
334 <p>We can also provide a custom <a href="Ext.data.proxy.Ajax.html#encodeFilters" rel="Ext.data.proxy.Ajax#encodeFilters" class="docClass">encodeFilters</a> function to encode our filters.</p>
335
336 <div class="members"><div class="m-cfgs"><div class="definedBy">Defined By</div><a name="configs"></a><h3 class="cfg p">Config Options</h3><h4 class="cfgGroup">Other Configs</h4><div id="config-api" class="member f inherited"><a href="Ext.data.proxy.Ajax.html#config-api" rel="config-api" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-api" class="viewSource">view source</a></div><a name="api"></a><a name="config-api"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-api" class="cls expand">api</a><span> : Object</span></div><div class="description"><div class="short">Specific urls to call on CRUD action methods "read", "create", "update" and "destroy".
337 Defaults to:
338
339 api: {
340     read ...</div><div class="long"><p>Specific urls to call on CRUD action methods "read", "create", "update" and "destroy".
341 Defaults to:</p>
342
343 <pre><code>api: {
344     read    : undefined,
345     create  : undefined,
346     update  : undefined,
347     destroy : undefined
348 }
349 </code></pre>
350
351
352 <p>The url is built based upon the action being executed <tt>[load|create|save|destroy]</tt>
353 using the commensurate <tt><a href="Ext.data.proxy.Ajax.html#api" rel="Ext.data.proxy.Ajax#api" class="docClass">api</a></tt> property, or if undefined default to the
354 configured <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Ext.data.Store</a>.<a href="Ext.data.proxy.Server.html#url" rel="Ext.data.proxy.Server#url" class="docClass">url</a>.</p>
355
356
357 <br>
358
359
360 <p>For example:</p>
361
362
363 <pre><code>api: {
364     load :    '/controller/load',
365     create :  '/controller/new',
366     save :    '/controller/update',
367     destroy : '/controller/destroy_action'
368 }
369 </code></pre>
370
371
372 <p>If the specific URL for a given CRUD action is undefined, the CRUD action request
373 will be directed to the configured <tt><a href="Ext.data.proxy.Server.html#url" rel="Ext.data.proxy.Server#url" class="docClass">url</a></tt>.</p>
374
375 </div></div></div><div id="config-batchActions" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-batchActions" rel="config-batchActions" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-cfg-batchActions" class="viewSource">view source</a></div><a name="batchActions"></a><a name="config-batchActions"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-batchActions" class="cls expand">batchActions</a><span> : Boolean</span></div><div class="description"><div class="short"><p>True to batch actions of a particular type when synchronizing the store.
376 Defaults to <tt>true</tt>.</p>
377 </div><div class="long"><p>True to batch actions of a particular type when synchronizing the store.
378 Defaults to <tt>true</tt>.</p>
379 </div></div></div><div id="config-batchOrder" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-batchOrder" rel="config-batchOrder" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-cfg-batchOrder" class="viewSource">view source</a></div><a name="batchOrder"></a><a name="config-batchOrder"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-batchOrder" class="cls expand">batchOrder</a><span> : String</span></div><div class="description"><div class="short">Comma-separated ordering 'create', 'update' and 'destroy' actions when batching. Override this
380 to set a different ord...</div><div class="long"><p>Comma-separated ordering 'create', 'update' and 'destroy' actions when batching. Override this
381 to set a different order for the batched CRUD actions to be executed in. Defaults to 'create,update,destroy'</p>
382 </div></div></div><div id="config-cacheString" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-cacheString" rel="config-cacheString" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-cacheString" class="viewSource">view source</a></div><a name="cacheString"></a><a name="config-cacheString"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-cacheString" class="cls expand">cacheString</a><span> : String</span></div><div class="description"><div class="short"><p>The name of the cache param added to the url when using noCache (defaults to "_dc")</p>
383 </div><div class="long"><p>The name of the cache param added to the url when using noCache (defaults to "_dc")</p>
384 </div></div></div><div id="config-directionParam" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-directionParam" rel="config-directionParam" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-directionParam" class="viewSource">view source</a></div><a name="directionParam"></a><a name="config-directionParam"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-directionParam" class="cls expand">directionParam</a><span> : String</span></div><div class="description"><div class="short">The name of the direction parameter to send in a request. This is only used when simpleSortMode is set to true.
385 Defau...</div><div class="long"><p>The name of the direction parameter to send in a request. <strong>This is only used when simpleSortMode is set to true.</strong>
386 Defaults to 'dir'.</p>
387 </div></div></div><div id="config-extraParams" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-extraParams" rel="config-extraParams" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-extraParams" class="viewSource">view source</a></div><a name="extraParams"></a><a name="config-extraParams"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-extraParams" class="cls expand">extraParams</a><span> : Object</span></div><div class="description"><div class="short">Extra parameters that will be included on every request. Individual requests with params
388 of the same name will overri...</div><div class="long"><p>Extra parameters that will be included on every request. Individual requests with params
389 of the same name will override these params when they are in conflict.</p>
390 </div></div></div><div id="config-filterParam" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-filterParam" rel="config-filterParam" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-filterParam" class="viewSource">view source</a></div><a name="filterParam"></a><a name="config-filterParam"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-filterParam" class="cls expand">filterParam</a><span> : String</span></div><div class="description"><div class="short">The name of the 'filter' parameter to send in a request. Defaults to 'filter'. Set
391 this to undefined if you don't wan...</div><div class="long"><p>The name of the 'filter' parameter to send in a request. Defaults to 'filter'. Set
392 this to undefined if you don't want to send a filter parameter</p>
393 </div></div></div><div id="config-groupParam" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-groupParam" rel="config-groupParam" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-groupParam" class="viewSource">view source</a></div><a name="groupParam"></a><a name="config-groupParam"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-groupParam" class="cls expand">groupParam</a><span> : String</span></div><div class="description"><div class="short">The name of the 'group' parameter to send in a request. Defaults to 'group'. Set this
394 to undefined if you don't want ...</div><div class="long"><p>The name of the 'group' parameter to send in a request. Defaults to 'group'. Set this
395 to undefined if you don't want to send a group parameter</p>
396 </div></div></div><div id="config-headers" class="member ni"><a href="Ext.data.proxy.Ajax.html#config-headers" rel="config-headers" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Ajax.html" class="definedIn docClass">Ext.data.proxy.Ajax</a><br/><a href="../source/Ajax2.html#Ext-data.proxy.Ajax-cfg-headers" class="viewSource">view source</a></div><a name="headers"></a><a name="config-headers"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-headers" class="cls expand">headers</a><span> : Object</span></div><div class="description"><div class="short"><p>Any headers to add to the Ajax request. Defaults to <tt>undefined</tt>.</p>
397 </div><div class="long"><p>Any headers to add to the Ajax request. Defaults to <tt>undefined</tt>.</p>
398 </div></div></div><div id="config-limitParam" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-limitParam" rel="config-limitParam" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-limitParam" class="viewSource">view source</a></div><a name="limitParam"></a><a name="config-limitParam"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-limitParam" class="cls expand">limitParam</a><span> : String</span></div><div class="description"><div class="short">The name of the 'limit' parameter to send in a request. Defaults to 'limit'. Set this
399 to undefined if you don't want ...</div><div class="long"><p>The name of the 'limit' parameter to send in a request. Defaults to 'limit'. Set this
400 to undefined if you don't want to send a limit parameter</p>
401 </div></div></div><div id="config-listeners" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-listeners" rel="config-listeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-cfg-listeners" class="viewSource">view source</a></div><a name="listeners"></a><a name="config-listeners"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-listeners" class="cls expand">listeners</a><span> : Object</span></div><div class="description"><div class="short">(optional) A config object containing one or more event handlers to be added to this
402 object during initialization.  T...</div><div class="long"><p>(optional) <p>A config object containing one or more event handlers to be added to this
403 object during initialization.  This should be a valid listeners config object as specified in the
404 <a href="Ext.data.proxy.Ajax.html#addListener" rel="Ext.data.proxy.Ajax#addListener" class="docClass">addListener</a> example for attaching multiple handlers at once.</p></p>
405
406 <br><p><b><u>DOM events from ExtJs <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a></u></b></p>
407
408
409 <br><p>While <i>some</i> ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
410
411
412 <p>is usually only done when extra value can be added. For example the <a href="Ext.view.View.html" rel="Ext.view.View" class="docClass">DataView</a>'s
413 <b><code><a href="Ext.view.View.html#click" rel="Ext.view.View#click" class="docClass">click</a></code></b> event passing the node clicked on. To access DOM
414 events directly from a child element of a Component, we need to specify the <code>element</code> option to
415 identify the Component property to add a DOM listener to:</p>
416
417 <pre><code>new Ext.panel.Panel({
418     width: 400,
419     height: 200,
420     dockedItems: [{
421         xtype: 'toolbar'
422     }],
423     listeners: {
424         click: {
425             element: 'el', //bind to the underlying el property on the panel
426             fn: function(){ console.log('click el'); }
427         },
428         dblclick: {
429             element: 'body', //bind to the underlying body property on the panel
430             fn: function(){ console.log('dblclick body'); }
431         }
432     }
433 });
434 </code></pre>
435
436
437 <p></p></p>
438 </div></div></div><div id="config-model" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-model" rel="config-model" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-cfg-model" class="viewSource">view source</a></div><a name="model"></a><a name="config-model"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-model" class="cls expand">model</a><span> : String/Ext.data.Model</span></div><div class="description"><div class="short">The name of the Model to tie to this Proxy. Can be either the string name of
439 the Model, or a reference to the Model c...</div><div class="long"><p>The name of the Model to tie to this Proxy. Can be either the string name of
440 the Model, or a reference to the Model constructor. Required.</p>
441 </div></div></div><div id="config-noCache" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-noCache" rel="config-noCache" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-noCache" class="viewSource">view source</a></div><a name="noCache"></a><a name="config-noCache"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-noCache" class="cls expand">noCache</a><span> : Boolean</span></div><div class="description"><div class="short"><p>(optional) Defaults to true. Disable caching by adding a unique parameter
442 name to the request.</p>
443 </div><div class="long"><p>(optional) Defaults to true. Disable caching by adding a unique parameter
444 name to the request.</p>
445 </div></div></div><div id="config-pageParam" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-pageParam" rel="config-pageParam" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-pageParam" class="viewSource">view source</a></div><a name="pageParam"></a><a name="config-pageParam"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-pageParam" class="cls expand">pageParam</a><span> : String</span></div><div class="description"><div class="short">The name of the 'page' parameter to send in a request. Defaults to 'page'. Set this to
446 undefined if you don't want to...</div><div class="long"><p>The name of the 'page' parameter to send in a request. Defaults to 'page'. Set this to
447 undefined if you don't want to send a page parameter</p>
448 </div></div></div><div id="config-reader" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-reader" rel="config-reader" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-reader" class="viewSource">view source</a></div><a name="reader"></a><a name="config-reader"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-reader" class="cls expand">reader</a><span> : Object/String/Ext.data.reader.Reader</span></div><div class="description"><div class="short">The Ext.data.reader.Reader to use to decode the server's response. This can
449 either be a Reader instance, a config obj...</div><div class="long"><p>The <a href="Ext.data.reader.Reader.html" rel="Ext.data.reader.Reader" class="docClass">Ext.data.reader.Reader</a> to use to decode the server's response. This can
450 either be a Reader instance, a config object or just a valid Reader type name (e.g. 'json', 'xml').</p>
451 </div></div></div><div id="config-simpleSortMode" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-simpleSortMode" rel="config-simpleSortMode" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-simpleSortMode" class="viewSource">view source</a></div><a name="simpleSortMode"></a><a name="config-simpleSortMode"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-simpleSortMode" class="cls expand">simpleSortMode</a><span> : Boolean</span></div><div class="description"><div class="short">Enabling simpleSortMode in conjunction with remoteSort will only send one sort property and a direction when a remote...</div><div class="long"><p>Enabling simpleSortMode in conjunction with remoteSort will only send one sort property and a direction when a remote sort is requested.
452 The directionParam and sortParam will be sent with the property name and either 'ASC' or 'DESC'</p>
453 </div></div></div><div id="config-sortParam" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-sortParam" rel="config-sortParam" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-sortParam" class="viewSource">view source</a></div><a name="sortParam"></a><a name="config-sortParam"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-sortParam" class="cls expand">sortParam</a><span> : String</span></div><div class="description"><div class="short">The name of the 'sort' parameter to send in a request. Defaults to 'sort'. Set this
454 to undefined if you don't want to...</div><div class="long"><p>The name of the 'sort' parameter to send in a request. Defaults to 'sort'. Set this
455 to undefined if you don't want to send a sort parameter</p>
456 </div></div></div><div id="config-startParam" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-startParam" rel="config-startParam" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-startParam" class="viewSource">view source</a></div><a name="startParam"></a><a name="config-startParam"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-startParam" class="cls expand">startParam</a><span> : String</span></div><div class="description"><div class="short">The name of the 'start' parameter to send in a request. Defaults to 'start'. Set this
457 to undefined if you don't want ...</div><div class="long"><p>The name of the 'start' parameter to send in a request. Defaults to 'start'. Set this
458 to undefined if you don't want to send a start parameter</p>
459 </div></div></div><div id="config-timeout" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-timeout" rel="config-timeout" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-timeout" class="viewSource">view source</a></div><a name="timeout"></a><a name="config-timeout"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-timeout" class="cls expand">timeout</a><span> : Number</span></div><div class="description"><div class="short"><p>(optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.</p>
460 </div><div class="long"><p>(optional) The number of milliseconds to wait for a response. Defaults to 30 seconds.</p>
461 </div></div></div><div id="config-url" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-url" rel="config-url" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-url" class="viewSource">view source</a></div><a name="url"></a><a name="config-url"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-url" class="cls expand">url</a><span> : String</span></div><div class="description"><div class="short"><p>The URL from which to request the data object.</p>
462 </div><div class="long"><p>The URL from which to request the data object.</p>
463 </div></div></div><div id="config-writer" class="member inherited"><a href="Ext.data.proxy.Ajax.html#config-writer" rel="config-writer" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-cfg-writer" class="viewSource">view source</a></div><a name="writer"></a><a name="config-writer"></a><a href="Ext.data.proxy.Ajax.html#" rel="config-writer" class="cls expand">writer</a><span> : Object/String/Ext.data.writer.Writer</span></div><div class="description"><div class="short">The Ext.data.writer.Writer to use to encode any request sent to the server.
464 This can either be a Writer instance, a c...</div><div class="long"><p>The <a href="Ext.data.writer.Writer.html" rel="Ext.data.writer.Writer" class="docClass">Ext.data.writer.Writer</a> to use to encode any request sent to the server.
465 This can either be a Writer instance, a config object or just a valid Writer type name (e.g. 'json', 'xml').</p>
466 </div></div></div></div><div class="m-properties"><a name="properties"></a><div class="definedBy">Defined By</div><h3 class="prp p">Properties</h3><div id="property-actionMethods" class="member f ni"><a href="Ext.data.proxy.Ajax.html#property-actionMethods" rel="property-actionMethods" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Ajax.html" class="definedIn docClass">Ext.data.proxy.Ajax</a><br/><a href="../source/Ajax2.html#Ext-data.proxy.Ajax-property-actionMethods" class="viewSource">view source</a></div><a name="actionMethods"></a><a name="property-actionMethods"></a><a href="Ext.data.proxy.Ajax.html#" rel="property-actionMethods" class="cls expand">actionMethods</a><span> : Object</span></div><div class="description"><div class="short">Mapping of action name to HTTP request method. In the basic AjaxProxy these are set to 'GET' for 'read' actions and '...</div><div class="long"><p>Mapping of action name to HTTP request method. In the basic AjaxProxy these are set to 'GET' for 'read' actions and 'POST'
467 for 'create', 'update' and 'destroy' actions. The <a href="Ext.data.proxy.Rest.html" rel="Ext.data.proxy.Rest" class="docClass">Ext.data.proxy.Rest</a> maps these to the correct RESTful methods.</p>
468 </div></div></div><div id="property-afterRequest" class="member inherited"><a href="Ext.data.proxy.Ajax.html#property-afterRequest" rel="property-afterRequest" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-property-afterRequest" class="viewSource">view source</a></div><a name="afterRequest"></a><a name="property-afterRequest"></a><a href="Ext.data.proxy.Ajax.html#" rel="property-afterRequest" class="cls expand">afterRequest</a><span> : Object</span></div><div class="description"><div class="short"><p>Optional callback function which can be used to clean up after a request has been completed.</p>
469 </div><div class="long"><p>Optional callback function which can be used to clean up after a request has been completed.</p>
470 </div></div></div><div id="property-create" class="member inherited"><a href="Ext.data.proxy.Ajax.html#property-create" rel="property-create" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-property-create" class="viewSource">view source</a></div><a name="create"></a><a name="property-create"></a><a href="Ext.data.proxy.Ajax.html#" rel="property-create" class="cls expand">create</a><span> : Object</span></div><div class="description"><div class="short"><p>Performs the given create operation.</p>
471 </div><div class="long"><p>Performs the given create operation.</p>
472 </div></div></div><div id="property-destroy" class="member inherited"><a href="Ext.data.proxy.Ajax.html#property-destroy" rel="property-destroy" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-property-destroy" class="viewSource">view source</a></div><a name="destroy"></a><a name="property-destroy"></a><a href="Ext.data.proxy.Ajax.html#" rel="property-destroy" class="cls expand">destroy</a><span> : Object</span></div><div class="description"><div class="short"><p>Performs the given destroy operation.</p>
473 </div><div class="long"><p>Performs the given destroy operation.</p>
474 </div></div></div><div id="property-read" class="member inherited"><a href="Ext.data.proxy.Ajax.html#property-read" rel="property-read" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-property-read" class="viewSource">view source</a></div><a name="read"></a><a name="property-read"></a><a href="Ext.data.proxy.Ajax.html#" rel="property-read" class="cls expand">read</a><span> : Object</span></div><div class="description"><div class="short"><p>Performs the given read operation.</p>
475 </div><div class="long"><p>Performs the given read operation.</p>
476 </div></div></div><div id="property-update" class="member inherited"><a href="Ext.data.proxy.Ajax.html#property-update" rel="property-update" class="expand more"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-property-update" class="viewSource">view source</a></div><a name="update"></a><a name="property-update"></a><a href="Ext.data.proxy.Ajax.html#" rel="property-update" class="cls expand">update</a><span> : Object</span></div><div class="description"><div class="short"><p>Performs the given update operation.</p>
477 </div><div class="long"><p>Performs the given update operation.</p>
478 </div></div></div></div><div class="m-methods"><a name="methods"></a><div class="definedBy">Defined By</div><h3 class="mth p">Methods</h3><div id="method-Ajax" class="member f ni"><a href="Ext.data.proxy.Ajax.html#method-Ajax" rel="method-Ajax" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Ajax.html" class="definedIn docClass">Ext.data.proxy.Ajax</a><br/><a href="../source/Ajax2.html#Ext-data.proxy.Ajax-method-constructor" class="viewSource">view source</a></div><a name="Ajax"></a><a name="method-Ajax"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-Ajax" class="cls expand">Ajax</a> : void</div><div class="description"><div class="short">Note that if this HttpProxy is being used by a Store, then the
479 Store's call to load will override any specified callb...</div><div class="long"><p>Note that if this HttpProxy is being used by a <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Store</a>, then the
480 Store's call to <a href="Ext.data.proxy.Ajax.html#load" rel="Ext.data.proxy.Ajax#load" class="docClass">load</a> will override any specified <tt>callback</tt> and <tt>params</tt>
481 options. In this case, use the Store's <a href="Ext.data.Store.html#events" rel="Ext.data.Store#events" class="docClass">events</a> to modify parameters,
482 or react to loading events. The Store's <a href="Ext.data.Store.html#baseParams" rel="Ext.data.Store#baseParams" class="docClass">baseParams</a> may also be
483 used to pass parameters known at instantiation time.</p>
484
485
486
487
488 <p>If an options parameter is passed, the singleton <a href="Ext.Ajax.html" rel="Ext.Ajax" class="docClass">Ext.Ajax</a> object will be used to make
489 the request.</p>
490
491 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
492 </li></ul></div></div></div><div id="method-addEvents" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-addEvents" rel="method-addEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addEvents" class="viewSource">view source</a></div><a name="addEvents"></a><a name="method-addEvents"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-addEvents" class="cls expand">addEvents</a>(
493 <span class="pre">Object/String o, String </span>)
494  : void</div><div class="description"><div class="short"><p>Adds the specified events to the list of events which this Observable may fire.</p>
495 </div><div class="long"><p>Adds the specified events to the list of events which this Observable may fire.</p>
496 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Object/String<div class="sub-desc"><p>Either an object with event names as properties with a value of <code>true</code>
497 or the first event name string if multiple event names are being passed as separate parameters.</p>
498 </div></li><li><span class="pre"></span> : String<div class="sub-desc"><p>[additional] Optional additional event names if multiple event names are being passed as separate parameters.
499 Usage:</p>
500
501 <pre><code>this.addEvents('storeloaded', 'storecleared');
502 </code></pre>
503
504 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
505 </li></ul></div></div></div><div id="method-addListener" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-addListener" rel="method-addListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addListener" class="viewSource">view source</a></div><a name="addListener"></a><a name="method-addListener"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-addListener" class="cls expand">addListener</a>(
506 <span class="pre">String eventName, Function handler, [Object scope], [Object options]</span>)
507  : void</div><div class="description"><div class="short"><p>Appends an event handler to this object.</p>
508 </div><div class="long"><p>Appends an event handler to this object.</p>
509 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to listen for. May also be an object who's property names are event names. See</p>
510 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The method the event invokes.</p>
511 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
512 <b>If omitted, defaults to the object which fired the event.</b></p>
513 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>(optional) An object containing handler configuration.
514 properties. This may contain any of the following properties:<ul>
515 <li><b>scope</b> : Object<div class="sub-desc">The scope (<code><b>this</b></code> reference) in which the handler function is executed.
516 <b>If omitted, defaults to the object which fired the event.</b></div></li>
517 <li><b>delay</b> : Number<div class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</div></li>
518 <li><b>single</b> : Boolean<div class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</div></li>
519 <li><b>buffer</b> : Number<div class="sub-desc">Causes the handler to be scheduled to run in an <a href="Ext.util.DelayedTask.html" rel="Ext.util.DelayedTask" class="docClass">Ext.util.DelayedTask</a> delayed
520 by the specified number of milliseconds. If the event fires again within that time, the original
521 handler is <em>not</em> invoked, but the new handler is scheduled in its place.</div></li>
522 <li><b>target</b> : Observable<div class="sub-desc">Only call the handler if the event was fired on the target Observable, <i>not</i>
523 if the event was bubbled up from a child Observable.</div></li>
524 <li><b>element</b> : String<div class="sub-desc"><b>This option is only valid for listeners bound to <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a>.</b>
525 The name of a Component property which references an element to add a listener to.</p>
526
527 <p>This option is useful during Component construction to add DOM event listeners to elements of <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Components</a> which
528 will exist only after the Component is rendered. For example, to add a click listener to a Panel's body:
529 <pre><code>new Ext.panel.Panel({
530     title: 'The title',
531     listeners: {
532         click: this.handlePanelClick,
533         element: 'body'
534     }
535 });
536 </code></pre></p>
537
538
539 <p>When added in this way, the options available are the options applicable to <a href="Ext.core.Element.html#addListener" rel="Ext.core.Element#addListener" class="docClass">Ext.core.Element.addListener</a></p>
540
541
542 <p></div></li>
543 </ul><br></p>
544
545 <p>
546 <b>Combining Options</b><br>
547 Using the options argument, it is possible to combine different types of listeners:<br>
548 <br>
549 A delayed, one-time listener.
550 <pre><code>myPanel.on('hide', this.handleClick, this, {
551 single: true,
552 delay: 100
553 });</code></pre>
554 <p>
555 <b>Attaching multiple handlers in 1 call</b><br>
556 The method also allows for a single argument to be passed which is a config object containing properties
557 which specify multiple events. For example:
558 <pre><code>myGridPanel.on({
559     cellClick: this.onCellClick,
560     mouseover: this.onMouseOver,
561     mouseout: this.onMouseOut,
562     scope: this // Important. Ensure "this" is correct during handler execution
563 });
564 </code></pre>.
565 <p>
566
567 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
568 </li></ul></div></div></div><div id="method-addManagedListener" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-addManagedListener" rel="method-addManagedListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-addManagedListener" class="viewSource">view source</a></div><a name="addManagedListener"></a><a name="method-addManagedListener"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-addManagedListener" class="cls expand">addManagedListener</a>(
569 <span class="pre">Observable/Element item, Object/String ename, Function fn, Object scope, Object opt</span>)
570  : void</div><div class="description"><div class="short"><p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component
571 is destroyed.
572
573 </div><div class="long"><p>Adds listeners to any Observable object (or Element) which are automatically removed when this Component
574 is destroyed.
575
576 <h3 class="pa">Parameters</h3><ul><li><span class="pre">item</span> : Observable/Element<div class="sub-desc"><p>The item to which to add a listener/listeners.</p>
577 </div></li><li><span class="pre">ename</span> : Object/String<div class="sub-desc"><p>The event name, or an object containing event name properties.</p>
578 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
579 is the handler function.</p>
580 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
581 is the scope (<code>this</code> reference) in which the handler function is executed.</p>
582 </div></li><li><span class="pre">opt</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
583 is the <a href="Ext.util.Observable.html#addListener" rel="Ext.util.Observable#addListener" class="docClass">addListener</a> options.</p>
584 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
585 </li></ul></div></div></div><div id="method-batch" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-batch" rel="method-batch" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-method-batch" class="viewSource">view source</a></div><a name="batch"></a><a name="method-batch"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-batch" class="cls expand">batch</a>(
586 <span class="pre">Object operations, Object listeners</span>)
587  : Ext.data.Batch</div><div class="description"><div class="short">Performs a batch of Operations, in the order specified by batchOrder. Used internally by
588 Ext.data.Store's sync method...</div><div class="long"><p>Performs a batch of <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">Operations</a>, in the order specified by <a href="Ext.data.proxy.Ajax.html#batchOrder" rel="Ext.data.proxy.Ajax#batchOrder" class="docClass">batchOrder</a>. Used internally by
589 <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Ext.data.Store</a>'s <a href="Ext.data.Store.html#sync" rel="Ext.data.Store#sync" class="docClass">sync</a> method. Example usage:</p>
590
591 <pre><code>myProxy.batch({
592     create : [myModel1, myModel2],
593     update : [myModel3],
594     destroy: [myModel4, myModel5]
595 });
596 </code></pre>
597
598
599 <p>Where the myModel* above are <a href="Ext.data.Model.html" rel="Ext.data.Model" class="docClass">Model</a> instances - in this case 1 and 2 are new instances and have not been
600 saved before, 3 has been saved previously but needs to be updated, and 4 and 5 have already been saved but should now be destroyed.</p>
601 <h3 class="pa">Parameters</h3><ul><li><span class="pre">operations</span> : Object<div class="sub-desc"><p>Object containing the Model instances to act upon, keyed by action name</p>
602 </div></li><li><span class="pre">listeners</span> : Object<div class="sub-desc"><p>Optional listeners object passed straight through to the Batch - see <a href="Ext.data.Batch.html" rel="Ext.data.Batch" class="docClass">Ext.data.Batch</a></p>
603 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Batch</span>&nbsp; &nbsp;<p>The newly created <a href="Ext.data.Batch.html" rel="Ext.data.Batch" class="docClass">Ext.data.Batch</a> object</p>
604 </li></ul></div></div></div><div id="method-buildRequest" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-buildRequest" rel="method-buildRequest" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-method-buildRequest" class="viewSource">view source</a></div><a name="buildRequest"></a><a name="method-buildRequest"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-buildRequest" class="cls expand">buildRequest</a>(
605 <span class="pre">Ext.data.Operation operation</span>)
606  : Ext.data.Request</div><div class="description"><div class="short"><p>Creates and returns an <a href="Ext.data.Request.html" rel="Ext.data.Request" class="docClass">Ext.data.Request</a> object based on the options passed by the <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Store</a>
607 that this Proxy is attached to.</p>
608 </div><div class="long"><p>Creates and returns an <a href="Ext.data.Request.html" rel="Ext.data.Request" class="docClass">Ext.data.Request</a> object based on the options passed by the <a href="Ext.data.Store.html" rel="Ext.data.Store" class="docClass">Store</a>
609 that this Proxy is attached to.</p>
610 <h3 class="pa">Parameters</h3><ul><li><span class="pre">operation</span> : Ext.data.Operation<div class="sub-desc"><p>The <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">Operation</a> object to execute</p>
611 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Request</span>&nbsp; &nbsp;<p>The request object</p>
612 </li></ul></div></div></div><div id="method-buildUrl" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-buildUrl" rel="method-buildUrl" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-method-buildUrl" class="viewSource">view source</a></div><a name="buildUrl"></a><a name="method-buildUrl"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-buildUrl" class="cls expand">buildUrl</a>(
613 <span class="pre">Ext.data.Request request</span>)
614  : String</div><div class="description"><div class="short">Generates a url based on a given Ext.data.Request object. By default, ServerProxy's buildUrl will
615 add the cache-buste...</div><div class="long"><p>Generates a url based on a given <a href="Ext.data.Request.html" rel="Ext.data.Request" class="docClass">Ext.data.Request</a> object. By default, ServerProxy's buildUrl will
616 add the cache-buster param to the end of the url. Subclasses may need to perform additional modifications
617 to the url.</p>
618 <h3 class="pa">Parameters</h3><ul><li><span class="pre">request</span> : Ext.data.Request<div class="sub-desc"><p>The request object</p>
619 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">String</span>&nbsp; &nbsp;<p>The url</p>
620 </li></ul></div></div></div><div id="method-capture" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-capture" rel="method-capture" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-capture" class="viewSource">view source</a></div><a name="capture"></a><a name="method-capture"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-capture" class="cls expand">capture</a>(
621 <span class="pre">Observable o, Function fn, [Object scope]</span>)
622  : void</div><div class="description"><div class="short">Starts capture on the specified Observable. All events will be passed
623 to the supplied function with the event name + ...</div><div class="long"><p>Starts capture on the specified Observable. All events will be passed
624 to the supplied function with the event name + standard signature of the event
625 <b>before</b> the event is fired. If the supplied function returns false,
626 the event will not fire.</p>
627 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Observable<div class="sub-desc"><p>The Observable to capture events from.</p>
628 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>The function to call when an event is fired.</p>
629 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the Observable firing the event.</p>
630 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
631 </li></ul></div></div></div><div id="method-clearListeners" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-clearListeners" rel="method-clearListeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-clearListeners" class="viewSource">view source</a></div><a name="clearListeners"></a><a name="method-clearListeners"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-clearListeners" class="cls expand">clearListeners</a> : void</div><div class="description"><div class="short"><p>Removes all listeners for this object including the managed listeners</p>
632 </div><div class="long"><p>Removes all listeners for this object including the managed listeners</p>
633 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
634 </li></ul></div></div></div><div id="method-clearManagedListeners" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-clearManagedListeners" rel="method-clearManagedListeners" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-clearManagedListeners" class="viewSource">view source</a></div><a name="clearManagedListeners"></a><a name="method-clearManagedListeners"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-clearManagedListeners" class="cls expand">clearManagedListeners</a> : void</div><div class="description"><div class="short"><p>Removes all managed listeners for this object.</p>
635 </div><div class="long"><p>Removes all managed listeners for this object.</p>
636 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
637 </li></ul></div></div></div><div id="method-doRequest" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-doRequest" rel="method-doRequest" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-method-doRequest" class="viewSource">view source</a></div><a name="doRequest"></a><a name="method-doRequest"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-doRequest" class="cls expand">doRequest</a>(
638 <span class="pre">Ext.data.Operation operation, Function callback, Object scope</span>)
639  : void</div><div class="description"><div class="short">In ServerProxy subclasses, the create, read, update and destroy methods all pass
640 through to doRequest. Each ServerPro...</div><div class="long"><p>In ServerProxy subclasses, the <a href="Ext.data.proxy.Ajax.html#create" rel="Ext.data.proxy.Ajax#create" class="docClass">create</a>, <a href="Ext.data.proxy.Ajax.html#read" rel="Ext.data.proxy.Ajax#read" class="docClass">read</a>, <a href="Ext.data.proxy.Ajax.html#update" rel="Ext.data.proxy.Ajax#update" class="docClass">update</a> and <a href="Ext.data.proxy.Ajax.html#destroy" rel="Ext.data.proxy.Ajax#destroy" class="docClass">destroy</a> methods all pass
641 through to doRequest. Each ServerProxy subclass must implement the doRequest method - see <a href="Ext.data.proxy.JsonP.html" rel="Ext.data.proxy.JsonP" class="docClass">Ext.data.proxy.JsonP</a>
642 and <a href="Ext.data.proxy.Ajax.html" rel="Ext.data.proxy.Ajax" class="docClass">Ext.data.proxy.Ajax</a> for examples. This method carries the same signature as each of the methods that delegate to it.</p>
643 <h3 class="pa">Parameters</h3><ul><li><span class="pre">operation</span> : Ext.data.Operation<div class="sub-desc"><p>The <a href="Ext.data.Operation.html" rel="Ext.data.Operation" class="docClass">Ext.data.Operation</a> object</p>
644 </div></li><li><span class="pre">callback</span> : Function<div class="sub-desc"><p>The callback function to call when the Operation has completed</p>
645 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>The scope in which to execute the callback</p>
646 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
647 </li></ul></div></div></div><div id="method-enableBubble" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-enableBubble" rel="method-enableBubble" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-enableBubble" class="viewSource">view source</a></div><a name="enableBubble"></a><a name="method-enableBubble"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-enableBubble" class="cls expand">enableBubble</a>(
648 <span class="pre">String/Array events</span>)
649  : void</div><div class="description"><div class="short">Enables events fired by this Observable to bubble up an owner hierarchy by calling
650 this.getBubbleTarget() if present....</div><div class="long"><p>Enables events fired by this Observable to bubble up an owner hierarchy by calling
651 <code>this.getBubbleTarget()</code> if present. There is no implementation in the Observable base class.</p>
652
653
654 <p>This is commonly used by Ext.Components to bubble events to owner Containers. See <a href="Ext.Component.html#getBubbleTarget" rel="Ext.Component#getBubbleTarget" class="docClass">Ext.Component.getBubbleTarget</a>. The default
655 implementation in <a href="Ext.Component.html" rel="Ext.Component" class="docClass">Ext.Component</a> returns the Component's immediate owner. But if a known target is required, this can be overridden to
656 access the required target more quickly.</p>
657
658
659 <p>Example:</p>
660
661
662 <pre><code>Ext.override(Ext.form.field.Base, {
663 //  Add functionality to Field&#39;s initComponent to enable the change event to bubble
664 initComponent : Ext.Function.createSequence(Ext.form.field.Base.prototype.initComponent, function() {
665     this.enableBubble('change');
666 }),
667
668 //  We know that we want Field&#39;s events to bubble directly to the FormPanel.
669 getBubbleTarget : function() {
670     if (!this.formPanel) {
671         this.formPanel = this.findParentByType('form');
672     }
673     return this.formPanel;
674 }
675 });
676
677 var myForm = new Ext.formPanel({
678 title: 'User Details',
679 items: [{
680     ...
681 }],
682 listeners: {
683     change: function() {
684         // Title goes red if form has been modified.
685         myForm.header.setStyle('color', 'red');
686     }
687 }
688 });
689 </code></pre>
690
691 <h3 class="pa">Parameters</h3><ul><li><span class="pre">events</span> : String/Array<div class="sub-desc"><p>The event name to bubble, or an Array of event names.</p>
692 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
693 </li></ul></div></div></div><div id="method-encodeFilters" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-encodeFilters" rel="method-encodeFilters" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-method-encodeFilters" class="viewSource">view source</a></div><a name="encodeFilters"></a><a name="method-encodeFilters"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-encodeFilters" class="cls expand">encodeFilters</a>(
694 <span class="pre">Array sorters</span>)
695  : String</div><div class="description"><div class="short">Encodes the array of Ext.util.Filter objects into a string to be sent in the request url. By default,
696 this simply JSO...</div><div class="long"><p>Encodes the array of <a href="Ext.util.Filter.html" rel="Ext.util.Filter" class="docClass">Ext.util.Filter</a> objects into a string to be sent in the request url. By default,
697 this simply JSON-encodes the filter data</p>
698 <h3 class="pa">Parameters</h3><ul><li><span class="pre">sorters</span> : Array<div class="sub-desc"><p>The array of <a href="Ext.util.Filter.html" rel="Ext.util.Filter" class="docClass">Filter</a> objects</p>
699 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">String</span>&nbsp; &nbsp;<p>The encoded filters</p>
700 </li></ul></div></div></div><div id="method-encodeSorters" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-encodeSorters" rel="method-encodeSorters" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-method-encodeSorters" class="viewSource">view source</a></div><a name="encodeSorters"></a><a name="method-encodeSorters"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-encodeSorters" class="cls expand">encodeSorters</a>(
701 <span class="pre">Array sorters</span>)
702  : String</div><div class="description"><div class="short">Encodes the array of Ext.util.Sorter objects into a string to be sent in the request url. By default,
703 this simply JSO...</div><div class="long"><p>Encodes the array of <a href="Ext.util.Sorter.html" rel="Ext.util.Sorter" class="docClass">Ext.util.Sorter</a> objects into a string to be sent in the request url. By default,
704 this simply JSON-encodes the sorter data</p>
705 <h3 class="pa">Parameters</h3><ul><li><span class="pre">sorters</span> : Array<div class="sub-desc"><p>The array of <a href="Ext.util.Sorter.html" rel="Ext.util.Sorter" class="docClass">Sorter</a> objects</p>
706 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">String</span>&nbsp; &nbsp;<p>The encoded sorters</p>
707 </li></ul></div></div></div><div id="method-fireEvent" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-fireEvent" rel="method-fireEvent" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-fireEvent" class="viewSource">view source</a></div><a name="fireEvent"></a><a name="method-fireEvent"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-fireEvent" class="cls expand">fireEvent</a>(
708 <span class="pre">String eventName, Object... args</span>)
709  : Boolean</div><div class="description"><div class="short">Fires the specified event with the passed parameters (minus the event name).
710
711
712 An event may be set to bubble up an Ob...</div><div class="long"><p>Fires the specified event with the passed parameters (minus the event name).</p>
713
714
715 <p>An event may be set to bubble up an Observable parent hierarchy (See <a href="Ext.Component.html#getBubbleTarget" rel="Ext.Component#getBubbleTarget" class="docClass">Ext.Component.getBubbleTarget</a>)
716 by calling <a href="Ext.data.proxy.Ajax.html#enableBubble" rel="Ext.data.proxy.Ajax#enableBubble" class="docClass">enableBubble</a>.</p>
717
718 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to fire.</p>
719 </div></li><li><span class="pre">args</span> : Object...<div class="sub-desc"><p>Variable number of parameters are passed to handlers.</p>
720 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>returns false if any of the handlers return false otherwise it returns true.</p>
721 </li></ul></div></div></div><div id="method-getMethod" class="member ni"><a href="Ext.data.proxy.Ajax.html#method-getMethod" rel="method-getMethod" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Ajax.html" class="definedIn docClass">Ext.data.proxy.Ajax</a><br/><a href="../source/Ajax2.html#Ext-data.proxy.Ajax-method-getMethod" class="viewSource">view source</a></div><a name="getMethod"></a><a name="method-getMethod"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-getMethod" class="cls expand">getMethod</a>(
722 <span class="pre">Ext.data.Request request</span>)
723  : String</div><div class="description"><div class="short"><p>Returns the HTTP method name for a given request. By default this returns based on a lookup on <a href="Ext.data.proxy.Ajax.html#actionMethods" rel="Ext.data.proxy.Ajax#actionMethods" class="docClass">actionMethods</a>.</p>
724 </div><div class="long"><p>Returns the HTTP method name for a given request. By default this returns based on a lookup on <a href="Ext.data.proxy.Ajax.html#actionMethods" rel="Ext.data.proxy.Ajax#actionMethods" class="docClass">actionMethods</a>.</p>
725 <h3 class="pa">Parameters</h3><ul><li><span class="pre">request</span> : Ext.data.Request<div class="sub-desc"><p>The request object</p>
726 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">String</span>&nbsp; &nbsp;<p>The HTTP method to use (should be one of 'GET', 'POST', 'PUT' or 'DELETE')</p>
727 </li></ul></div></div></div><div id="method-getModel" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-getModel" rel="method-getModel" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-method-getModel" class="viewSource">view source</a></div><a name="getModel"></a><a name="method-getModel"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-getModel" class="cls expand">getModel</a> : Ext.data.Model</div><div class="description"><div class="short"><p>Returns the model attached to this Proxy</p>
728 </div><div class="long"><p>Returns the model attached to this Proxy</p>
729 <h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.Model</span>&nbsp; &nbsp;<p>The model</p>
730 </li></ul></div></div></div><div id="method-getReader" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-getReader" rel="method-getReader" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-method-getReader" class="viewSource">view source</a></div><a name="getReader"></a><a name="method-getReader"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-getReader" class="cls expand">getReader</a> : Ext.data.reader.Reader</div><div class="description"><div class="short"><p>Returns the reader currently attached to this proxy instance</p>
731 </div><div class="long"><p>Returns the reader currently attached to this proxy instance</p>
732 <h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.reader.Reader</span>&nbsp; &nbsp;<p>The Reader instance</p>
733 </li></ul></div></div></div><div id="method-getWriter" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-getWriter" rel="method-getWriter" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-method-getWriter" class="viewSource">view source</a></div><a name="getWriter"></a><a name="method-getWriter"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-getWriter" class="cls expand">getWriter</a> : Ext.data.writer.Writer</div><div class="description"><div class="short"><p>Returns the writer currently attached to this proxy instance</p>
734 </div><div class="long"><p>Returns the writer currently attached to this proxy instance</p>
735 <h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.writer.Writer</span>&nbsp; &nbsp;<p>The Writer instance</p>
736 </li></ul></div></div></div><div id="method-hasListener" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-hasListener" rel="method-hasListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-hasListener" class="viewSource">view source</a></div><a name="hasListener"></a><a name="method-hasListener"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-hasListener" class="cls expand">hasListener</a>(
737 <span class="pre">String eventName</span>)
738  : Boolean</div><div class="description"><div class="short"><p>Checks to see if this object has any listeners for a specified event</p>
739 </div><div class="long"><p>Checks to see if this object has any listeners for a specified event</p>
740 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The name of the event to check for</p>
741 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Boolean</span>&nbsp; &nbsp;<p>True if the event is being listened for, else false</p>
742 </li></ul></div></div></div><div id="method-observe" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-observe" rel="method-observe" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-observe" class="viewSource">view source</a></div><a name="observe"></a><a name="method-observe"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-observe" class="cls expand">observe</a>(
743 <span class="pre">Function c, Object listeners</span>)
744  : void</div><div class="description"><div class="short">Sets observability on the passed class constructor.
745
746 This makes any event fired on any instance of the passed class a...</div><div class="long"><p>Sets observability on the passed class constructor.</p>
747
748 <p>This makes any event fired on any instance of the passed class also fire a single event through
749 the <strong>class</strong> allowing for central handling of events on many instances at once.</p>
750
751 <p>Usage:</p>
752
753 <pre><code>Ext.util.Observable.observe(Ext.data.Connection);
754 Ext.data.Connection.on('beforerequest', function(con, options) {
755     console.log('Ajax request made to ' + options.url);
756 });
757 </code></pre>
758 <h3 class="pa">Parameters</h3><ul><li><span class="pre">c</span> : Function<div class="sub-desc"><p>The class constructor to make observable.</p>
759 </div></li><li><span class="pre">listeners</span> : Object<div class="sub-desc"><p>An object containing a series of listeners to add. See <a href="Ext.data.proxy.Ajax.html#addListener" rel="Ext.data.proxy.Ajax#addListener" class="docClass">addListener</a>.</p>
760 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
761 </li></ul></div></div></div><div id="method-on" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-on" rel="method-on" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-on" class="viewSource">view source</a></div><a name="on"></a><a name="method-on"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-on" class="cls expand">on</a>(
762 <span class="pre">String eventName, Function handler, [Object scope], [Object options]</span>)
763  : void</div><div class="description"><div class="short"><p>Appends an event handler to this object (shorthand for <a href="Ext.data.proxy.Ajax.html#addListener" rel="Ext.data.proxy.Ajax#addListener" class="docClass">addListener</a>.)</p>
764 </div><div class="long"><p>Appends an event handler to this object (shorthand for <a href="Ext.data.proxy.Ajax.html#addListener" rel="Ext.data.proxy.Ajax#addListener" class="docClass">addListener</a>.)</p>
765 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event to listen for</p>
766 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The method the event invokes</p>
767 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope (<code><b>this</b></code> reference) in which the handler function is executed.
768 <b>If omitted, defaults to the object which fired the event.</b></p>
769 </div></li><li><span class="pre">options</span> : Object<div class="sub-desc"><p>(optional) An object containing handler configuration.</p>
770 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
771 </li></ul></div></div></div><div id="method-processResponse" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-processResponse" rel="method-processResponse" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-method-processResponse" class="viewSource">view source</a></div><a name="processResponse"></a><a name="method-processResponse"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-processResponse" class="cls expand">processResponse</a>(
772 <span class="pre">Object success, Object operation, Object request, Object response, Object callback, Object scope</span>)
773  : void</div><div class="description"><div class="short"><p>&nbsp;</p></div><div class="long">
774 <h3 class="pa">Parameters</h3><ul><li><span class="pre">success</span> : Object<div class="sub-desc">
775 </div></li><li><span class="pre">operation</span> : Object<div class="sub-desc">
776 </div></li><li><span class="pre">request</span> : Object<div class="sub-desc">
777 </div></li><li><span class="pre">response</span> : Object<div class="sub-desc">
778 </div></li><li><span class="pre">callback</span> : Object<div class="sub-desc">
779 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc">
780 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
781 </li></ul></div></div></div><div id="method-relayEvents" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-relayEvents" rel="method-relayEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-relayEvents" class="viewSource">view source</a></div><a name="relayEvents"></a><a name="method-relayEvents"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-relayEvents" class="cls expand">relayEvents</a>(
782 <span class="pre">Object origin, Array events, Object prefix</span>)
783  : void</div><div class="description"><div class="short"><p>Relays selected events from the specified Observable as if the events were fired by <code><b>this</b></code>.</p>
784 </div><div class="long"><p>Relays selected events from the specified Observable as if the events were fired by <code><b>this</b></code>.</p>
785 <h3 class="pa">Parameters</h3><ul><li><span class="pre">origin</span> : Object<div class="sub-desc"><p>The Observable whose events this object is to relay.</p>
786 </div></li><li><span class="pre">events</span> : Array<div class="sub-desc"><p>Array of event names to relay.</p>
787 </div></li><li><span class="pre">prefix</span> : Object<div class="sub-desc">
788 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
789 </li></ul></div></div></div><div id="method-releaseCapture" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-releaseCapture" rel="method-releaseCapture" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-releaseCapture" class="viewSource">view source</a></div><a name="releaseCapture"></a><a name="method-releaseCapture"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-releaseCapture" class="cls expand">releaseCapture</a>(
790 <span class="pre">Observable o</span>)
791  : void</div><div class="description"><div class="short"><p>Removes <b>all</b> added captures from the Observable.</p>
792 </div><div class="long"><p>Removes <b>all</b> added captures from the Observable.</p>
793 <h3 class="pa">Parameters</h3><ul><li><span class="pre">o</span> : Observable<div class="sub-desc"><p>The Observable to release</p>
794 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
795 </li></ul></div></div></div><div id="method-removeListener" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-removeListener" rel="method-removeListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-removeListener" class="viewSource">view source</a></div><a name="removeListener"></a><a name="method-removeListener"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-removeListener" class="cls expand">removeListener</a>(
796 <span class="pre">String eventName, Function handler, [Object scope]</span>)
797  : void</div><div class="description"><div class="short"><p>Removes an event handler.</p>
798 </div><div class="long"><p>Removes an event handler.</p>
799 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event the handler was associated with.</p>
800 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The handler to remove. <b>This must be a reference to the function passed into the <a href="Ext.data.proxy.Ajax.html#addListener" rel="Ext.data.proxy.Ajax#addListener" class="docClass">addListener</a> call.</b></p>
801 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope originally specified for the handler.</p>
802 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
803 </li></ul></div></div></div><div id="method-removeManagedListener" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-removeManagedListener" rel="method-removeManagedListener" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-removeManagedListener" class="viewSource">view source</a></div><a name="removeManagedListener"></a><a name="method-removeManagedListener"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-removeManagedListener" class="cls expand">removeManagedListener</a>(
804 <span class="pre">Observable|Element item, Object|String ename, Function fn, Object scope</span>)
805  : void</div><div class="description"><div class="short"><p>Removes listeners that were added by the <a href="Ext.data.proxy.Ajax.html#mon" rel="Ext.data.proxy.Ajax#mon" class="docClass">mon</a> method.</p>
806 </div><div class="long"><p>Removes listeners that were added by the <a href="Ext.data.proxy.Ajax.html#mon" rel="Ext.data.proxy.Ajax#mon" class="docClass">mon</a> method.</p>
807 <h3 class="pa">Parameters</h3><ul><li><span class="pre">item</span> : Observable|Element<div class="sub-desc"><p>The item from which to remove a listener/listeners.</p>
808 </div></li><li><span class="pre">ename</span> : Object|String<div class="sub-desc"><p>The event name, or an object containing event name properties.</p>
809 </div></li><li><span class="pre">fn</span> : Function<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
810 is the handler function.</p>
811 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>Optional. If the <code>ename</code> parameter was an event name, this
812 is the scope (<code>this</code> reference) in which the handler function is executed.</p>
813 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
814 </li></ul></div></div></div><div id="method-resumeEvents" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-resumeEvents" rel="method-resumeEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-resumeEvents" class="viewSource">view source</a></div><a name="resumeEvents"></a><a name="method-resumeEvents"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-resumeEvents" class="cls expand">resumeEvents</a> : void</div><div class="description"><div class="short">Resume firing events. (see suspendEvents)
815 If events were suspended using the queueSuspended parameter, then all
816 event...</div><div class="long"><p>Resume firing events. (see <a href="Ext.data.proxy.Ajax.html#suspendEvents" rel="Ext.data.proxy.Ajax#suspendEvents" class="docClass">suspendEvents</a>)
817 If events were suspended using the <code><b>queueSuspended</b></code> parameter, then all
818 events fired during event suspension will be sent to any listeners now.</p>
819 <h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
820 </li></ul></div></div></div><div id="method-setModel" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-setModel" rel="method-setModel" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-method-setModel" class="viewSource">view source</a></div><a name="setModel"></a><a name="method-setModel"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-setModel" class="cls expand">setModel</a>(
821 <span class="pre">String|Ext.data.Model model, Boolean setOnStore</span>)
822  : void</div><div class="description"><div class="short"><p>Sets the model associated with this proxy. This will only usually be called by a Store</p>
823 </div><div class="long"><p>Sets the model associated with this proxy. This will only usually be called by a Store</p>
824 <h3 class="pa">Parameters</h3><ul><li><span class="pre">model</span> : String|Ext.data.Model<div class="sub-desc"><p>The new model. Can be either the model name string,
825 or a reference to the model's constructor</p>
826 </div></li><li><span class="pre">setOnStore</span> : Boolean<div class="sub-desc"><p>Sets the new model on the associated Store, if one is present</p>
827 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
828 </li></ul></div></div></div><div id="method-setReader" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-setReader" rel="method-setReader" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-method-setReader" class="viewSource">view source</a></div><a name="setReader"></a><a name="method-setReader"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-setReader" class="cls expand">setReader</a>(
829 <span class="pre">String|Object|Ext.data.reader.Reader reader</span>)
830  : Ext.data.reader.Reader</div><div class="description"><div class="short"><p>Sets the Proxy's Reader by string, config object or Reader instance</p>
831 </div><div class="long"><p>Sets the Proxy's Reader by string, config object or Reader instance</p>
832 <h3 class="pa">Parameters</h3><ul><li><span class="pre">reader</span> : String|Object|Ext.data.reader.Reader<div class="sub-desc"><p>The new Reader, which can be either a type string, a configuration object
833 or an <a href="Ext.data.reader.Reader.html" rel="Ext.data.reader.Reader" class="docClass">Ext.data.reader.Reader</a> instance</p>
834 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.reader.Reader</span>&nbsp; &nbsp;<p>The attached Reader object</p>
835 </li></ul></div></div></div><div id="method-setWriter" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-setWriter" rel="method-setWriter" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Proxy.html" class="definedIn docClass">Ext.data.proxy.Proxy</a><br/><a href="../source/Proxy2.html#Ext-data.proxy.Proxy-method-setWriter" class="viewSource">view source</a></div><a name="setWriter"></a><a name="method-setWriter"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-setWriter" class="cls expand">setWriter</a>(
836 <span class="pre">String|Object|Ext.data.writer.Writer writer</span>)
837  : Ext.data.writer.Writer</div><div class="description"><div class="short"><p>Sets the Proxy's Writer by string, config object or Writer instance</p>
838 </div><div class="long"><p>Sets the Proxy's Writer by string, config object or Writer instance</p>
839 <h3 class="pa">Parameters</h3><ul><li><span class="pre">writer</span> : String|Object|Ext.data.writer.Writer<div class="sub-desc"><p>The new Writer, which can be either a type string, a configuration object
840 or an <a href="Ext.data.writer.Writer.html" rel="Ext.data.writer.Writer" class="docClass">Ext.data.writer.Writer</a> instance</p>
841 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">Ext.data.writer.Writer</span>&nbsp; &nbsp;<p>The attached Writer object</p>
842 </li></ul></div></div></div><div id="method-suspendEvents" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-suspendEvents" rel="method-suspendEvents" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-suspendEvents" class="viewSource">view source</a></div><a name="suspendEvents"></a><a name="method-suspendEvents"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-suspendEvents" class="cls expand">suspendEvents</a>(
843 <span class="pre">Boolean queueSuspended</span>)
844  : void</div><div class="description"><div class="short"><p>Suspend the firing of all events. (see <a href="Ext.data.proxy.Ajax.html#resumeEvents" rel="Ext.data.proxy.Ajax#resumeEvents" class="docClass">resumeEvents</a>)</p>
845 </div><div class="long"><p>Suspend the firing of all events. (see <a href="Ext.data.proxy.Ajax.html#resumeEvents" rel="Ext.data.proxy.Ajax#resumeEvents" class="docClass">resumeEvents</a>)</p>
846 <h3 class="pa">Parameters</h3><ul><li><span class="pre">queueSuspended</span> : Boolean<div class="sub-desc"><p>Pass as true to queue up suspended events to be fired
847 after the <a href="Ext.data.proxy.Ajax.html#resumeEvents" rel="Ext.data.proxy.Ajax#resumeEvents" class="docClass">resumeEvents</a> call instead of discarding all suspended events;</p>
848 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
849 </li></ul></div></div></div><div id="method-un" class="member inherited"><a href="Ext.data.proxy.Ajax.html#method-un" rel="method-un" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.util.Observable.html" class="definedIn docClass">Ext.util.Observable</a><br/><a href="../source/Observable.html#Ext-util.Observable-method-un" class="viewSource">view source</a></div><a name="un"></a><a name="method-un"></a><a href="Ext.data.proxy.Ajax.html#" rel="method-un" class="cls expand">un</a>(
850 <span class="pre">String eventName, Function handler, [Object scope]</span>)
851  : void</div><div class="description"><div class="short"><p>Removes an event handler (shorthand for <a href="Ext.data.proxy.Ajax.html#removeListener" rel="Ext.data.proxy.Ajax#removeListener" class="docClass">removeListener</a>.)</p>
852 </div><div class="long"><p>Removes an event handler (shorthand for <a href="Ext.data.proxy.Ajax.html#removeListener" rel="Ext.data.proxy.Ajax#removeListener" class="docClass">removeListener</a>.)</p>
853 <h3 class="pa">Parameters</h3><ul><li><span class="pre">eventName</span> : String<div class="sub-desc"><p>The type of event the handler was associated with.</p>
854 </div></li><li><span class="pre">handler</span> : Function<div class="sub-desc"><p>The handler to remove. <b>This must be a reference to the function passed into the <a href="Ext.data.proxy.Ajax.html#addListener" rel="Ext.data.proxy.Ajax#addListener" class="docClass">addListener</a> call.</b></p>
855 </div></li><li><span class="pre">scope</span> : Object<div class="sub-desc"><p>(optional) The scope originally specified for the handler.</p>
856 </div></li></ul><h3 class="pa">Returns</h3><ul><li><span class="pre">void</span>&nbsp; &nbsp;
857 </li></ul></div></div></div></div><div class="m-events"><a name="events"></a><div class="definedBy">Defined By</div><h3 class="evt p">Events</h3><div id="event-exception" class="member f inherited"><a href="Ext.data.proxy.Ajax.html#event-exception" rel="event-exception" class="expand more ar"><span>&nbsp;</span></a><div class="title"><div class="meta"><a href="Ext.data.proxy.Server.html" class="definedIn docClass">Ext.data.proxy.Server</a><br/><a href="../source/Server.html#Ext-data.proxy.Server-event-exception" class="viewSource">view source</a></div><a name="exception"></a><a name="event-exception"></a><a href="Ext.data.proxy.Ajax.html#" rel="event-exception" class="cls expand">exception</a>(
858 <span class="pre">Ext.data.proxy.Proxy this, Object response, Ext.data.Operation operation</span>)
859 </div><div class="description"><div class="short"><p>Fires when the server returns an exception</p>
860 </div><div class="long"><p>Fires when the server returns an exception</p>
861 <h3 class="pa">Parameters</h3><ul><li><span class="pre">this</span> : Ext.data.proxy.Proxy<div class="sub-desc">
862 </div></li><li><span class="pre">response</span> : Object<div class="sub-desc"><p>The response from the AJAX request</p>
863 </div></li><li><span class="pre">operation</span> : Ext.data.Operation<div class="sub-desc"><p>The operation that triggered request</p>
864 </div></li></ul></div></div></div></div></div></div></div><div id="pageContent"></div></div></div></div></body></html>