docs/src/Roo_bootstrap_Card.js.html
[roojs1] / docs / symbols / Roo.Ajax.json
1 {
2   "name" : "Roo.Ajax",
3   "augments" : [
4     "Roo.data.Connection",
5     "Roo.util.Observable"
6   ],
7   "desc" : "Global Ajax request class.",
8   "isSingleton" : false,
9   "isStatic" : false,
10   "isBuiltin" : false,
11   "memberOf" : "Ajax",
12   "example" : "",
13   "deprecated" : "",
14   "since" : "",
15   "see" : "",
16   "params" : [
17   ],
18   "returns" : [
19   ],
20   "config" : [
21     {
22       "name" : "listeners",
23       "type" : "Object",
24       "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n    listeners :  { \n       'click' : function(e) {\n           ..... \n        } ,\n        .... \n    } \n  </code></pre>",
25       "memberOf" : "Roo.util.Observable",
26       "optvals" : [
27       ]
28     },
29     {
30       "name" : "method",
31       "type" : "String",
32       "desc" : "(Optional)  The default HTTP method to be used for requests. (defaults to undefined; if not set but parms are present will use POST, otherwise GET)",
33       "memberOf" : "Roo.Ajax",
34       "optvals" : [
35       ]
36     },
37     {
38       "name" : "timeout",
39       "type" : "Number",
40       "desc" : "(Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)",
41       "memberOf" : "Roo.Ajax",
42       "optvals" : [
43       ]
44     },
45     {
46       "name" : "autoAbort",
47       "type" : "Boolean",
48       "desc" : "(Optional) Whether a new request should abort any pending requests. (defaults to false)",
49       "memberOf" : "Roo.Ajax",
50       "optvals" : [
51       ]
52     },
53     {
54       "name" : "url",
55       "type" : "String",
56       "desc" : "The default URL to be used for requests to the server. (defaults to undefined)",
57       "memberOf" : "Roo.Ajax",
58       "optvals" : [
59       ]
60     },
61     {
62       "name" : "extraParams",
63       "type" : "Object",
64       "desc" : "An object containing properties which are used as extra parameters to each request made by this object. (defaults to undefined)",
65       "memberOf" : "Roo.Ajax",
66       "optvals" : [
67       ]
68     },
69     {
70       "name" : "disableCaching",
71       "type" : "Boolean",
72       "desc" : "(Optional)   True to add a unique cache-buster param to GET requests. (defaults to true)",
73       "memberOf" : "Roo.Ajax",
74       "optvals" : [
75       ]
76     },
77     {
78       "name" : "defaultHeaders",
79       "type" : "Object",
80       "desc" : "An object containing request headers which are added to each request made by this object. (defaults to undefined)",
81       "memberOf" : "Roo.Ajax",
82       "optvals" : [
83       ]
84     }
85   ],
86   "methods" : [
87     {
88       "name" : "isLoading",
89       "desc" : "Determine whether this object has a request outstanding.",
90       "isStatic" : false,
91       "isConstructor" : false,
92       "isPrivate" : false,
93       "memberOf" : "Roo.data.Connection",
94       "example" : "",
95       "deprecated" : "",
96       "since" : "",
97       "see" : "",
98       "params" : [
99         {
100           "name" : "transactionId",
101           "type" : "Number",
102           "desc" : "(Optional) defaults to the last transaction",
103           "isOptional" : false
104         }
105       ],
106       "returns" : [
107         {
108           "name" : "",
109           "type" : "Boolean",
110           "desc" : "True if there is an outstanding request."
111         }
112       ]
113     },
114     {
115       "name" : "request",
116       "desc" : "Sends an HTTP request to a remote server.",
117       "isStatic" : false,
118       "isConstructor" : false,
119       "isPrivate" : false,
120       "memberOf" : "Roo.data.Connection",
121       "example" : "",
122       "deprecated" : "",
123       "since" : "",
124       "see" : "",
125       "params" : [
126         {
127           "name" : "options",
128           "type" : "Object",
129           "desc" : "An object which may contain the following properties:<ul>\n<li><b>url</b> {String} (Optional) The URL to which to send the request. Defaults to configured URL</li>\n<li><b>params</b> {Object/String/Function} (Optional) An object containing properties which are used as parameters to the\nrequest, a url encoded string or a function to call to get either.</li>\n<li><b>method</b> {String} (Optional) The HTTP method to use for the request. Defaults to the configured method, or\nif no method was configured, \"GET\" if no parameters are being sent, and \"POST\" if parameters are being sent.</li>\n<li><b>callback</b> {Function} (Optional) The function to be called upon receipt of the HTTP response.\nThe callback is called regardless of success or failure and is passed the following parameters:<ul>\n<li>options {Object} The parameter to the request call.</li>\n<li>success {Boolean} True if the request succeeded.</li>\n<li>response {Object} The XMLHttpRequest object containing the response data.</li>\n</ul></li>\n<li><b>success</b> {Function} (Optional) The function to be called upon success of the request.\nThe callback is passed the following parameters:<ul>\n<li>response {Object} The XMLHttpRequest object containing the response data.</li>\n<li>options {Object} The parameter to the request call.</li>\n</ul></li>\n<li><b>failure</b> {Function} (Optional) The function to be called upon failure of the request.\nThe callback is passed the following parameters:<ul>\n<li>response {Object} The XMLHttpRequest object containing the response data.</li>\n<li>options {Object} The parameter to the request call.</li>\n</ul></li>\n<li><b>scope</b> {Object} (Optional) The scope in which to execute the callbacks: The \"this\" object\nfor the callback function. Defaults to the browser window.</li>\n<li><b>form</b> {Object/String} (Optional) A form object or id to pull parameters from.</li>\n<li><b>isUpload</b> {Boolean} (Optional) True if the form object is a file upload (will usually be automatically detected).</li>\n<li><b>headers</b> {Object} (Optional) Request headers to set for the request.</li>\n<li><b>xmlData</b> {Object} (Optional) XML document to use for the post. Note: This will be used instead of\nparams for the post data. Any params will be appended to the URL.</li>\n<li><b>disableCaching</b> {Boolean} (Optional) True to add a unique cache-buster param to GET requests.</li>\n</ul>",
130           "isOptional" : false
131         }
132       ],
133       "returns" : [
134         {
135           "name" : "",
136           "type" : "Number",
137           "desc" : "transactionId"
138         }
139       ]
140     },
141     {
142       "name" : "abort",
143       "desc" : "Aborts any outstanding request.",
144       "isStatic" : false,
145       "isConstructor" : false,
146       "isPrivate" : false,
147       "memberOf" : "Roo.data.Connection",
148       "example" : "",
149       "deprecated" : "",
150       "since" : "",
151       "see" : "",
152       "params" : [
153         {
154           "name" : "transactionId",
155           "type" : "Number",
156           "desc" : "(Optional) defaults to the last transaction",
157           "isOptional" : false
158         }
159       ],
160       "returns" : [
161       ]
162     },
163     {
164       "name" : "purgeListeners",
165       "desc" : "Removes all listeners for this object",
166       "isStatic" : false,
167       "isConstructor" : false,
168       "isPrivate" : false,
169       "memberOf" : "Roo.util.Observable",
170       "example" : "",
171       "deprecated" : "",
172       "since" : "",
173       "see" : "",
174       "params" : [
175       ],
176       "returns" : [
177       ]
178     },
179     {
180       "name" : "on",
181       "desc" : "Appends an event handler to this element (shorthand for addListener)",
182       "isStatic" : false,
183       "isConstructor" : false,
184       "isPrivate" : false,
185       "memberOf" : "Roo.util.Observable",
186       "example" : "",
187       "deprecated" : "",
188       "since" : "",
189       "see" : "",
190       "params" : [
191         {
192           "name" : "eventName",
193           "type" : "String",
194           "desc" : "The type of event to listen for",
195           "isOptional" : false
196         },
197         {
198           "name" : "handler",
199           "type" : "Function",
200           "desc" : "The method the event invokes",
201           "isOptional" : false
202         },
203         {
204           "name" : "scope",
205           "type" : "Object",
206           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
207           "isOptional" : false
208         },
209         {
210           "name" : "options",
211           "type" : "Object",
212           "desc" : "(optional)",
213           "isOptional" : false
214         }
215       ],
216       "returns" : [
217       ]
218     },
219     {
220       "name" : "un",
221       "desc" : "Removes a listener (shorthand for removeListener)",
222       "isStatic" : false,
223       "isConstructor" : false,
224       "isPrivate" : false,
225       "memberOf" : "Roo.util.Observable",
226       "example" : "",
227       "deprecated" : "",
228       "since" : "",
229       "see" : "",
230       "params" : [
231         {
232           "name" : "eventName",
233           "type" : "String",
234           "desc" : "The type of event to listen for",
235           "isOptional" : false
236         },
237         {
238           "name" : "handler",
239           "type" : "Function",
240           "desc" : "The handler to remove",
241           "isOptional" : false
242         },
243         {
244           "name" : "scope",
245           "type" : "Object",
246           "desc" : "(optional) The scope (this object) for the handler",
247           "isOptional" : false
248         }
249       ],
250       "returns" : [
251       ]
252     },
253     {
254       "name" : "addEvents",
255       "desc" : "Used to define events on this Observable",
256       "isStatic" : false,
257       "isConstructor" : false,
258       "isPrivate" : false,
259       "memberOf" : "Roo.util.Observable",
260       "example" : "",
261       "deprecated" : "",
262       "since" : "",
263       "see" : "",
264       "params" : [
265         {
266           "name" : "object",
267           "type" : "Object",
268           "desc" : "The object with the events defined",
269           "isOptional" : false
270         }
271       ],
272       "returns" : [
273       ]
274     },
275     {
276       "name" : "releaseCapture",
277       "desc" : "Removes <b>all</b> added captures from the Observable.",
278       "isStatic" : true,
279       "isConstructor" : false,
280       "isPrivate" : false,
281       "memberOf" : "Roo.util.Observable",
282       "example" : "",
283       "deprecated" : "",
284       "since" : "",
285       "see" : "",
286       "params" : [
287         {
288           "name" : "o",
289           "type" : "Observable",
290           "desc" : "The Observable to release",
291           "isOptional" : false
292         }
293       ],
294       "returns" : [
295       ]
296     },
297     {
298       "name" : "removeListener",
299       "desc" : "Removes a listener",
300       "isStatic" : false,
301       "isConstructor" : false,
302       "isPrivate" : false,
303       "memberOf" : "Roo.util.Observable",
304       "example" : "",
305       "deprecated" : "",
306       "since" : "",
307       "see" : "",
308       "params" : [
309         {
310           "name" : "eventName",
311           "type" : "String",
312           "desc" : "The type of event to listen for",
313           "isOptional" : false
314         },
315         {
316           "name" : "handler",
317           "type" : "Function",
318           "desc" : "The handler to remove",
319           "isOptional" : false
320         },
321         {
322           "name" : "scope",
323           "type" : "Object",
324           "desc" : "(optional) The scope (this object) for the handler",
325           "isOptional" : false
326         }
327       ],
328       "returns" : [
329       ]
330     },
331     {
332       "name" : "fireEvent",
333       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
334       "isStatic" : false,
335       "isConstructor" : false,
336       "isPrivate" : false,
337       "memberOf" : "Roo.util.Observable",
338       "example" : "",
339       "deprecated" : "",
340       "since" : "",
341       "see" : "",
342       "params" : [
343         {
344           "name" : "eventName",
345           "type" : "String",
346           "desc" : "",
347           "isOptional" : false
348         },
349         {
350           "name" : "args",
351           "type" : "Object...",
352           "desc" : "Variable number of parameters are passed to handlers",
353           "isOptional" : false
354         }
355       ],
356       "returns" : [
357         {
358           "name" : "",
359           "type" : "Boolean",
360           "desc" : "returns false if any of the handlers return false otherwise it returns true"
361         }
362       ]
363     },
364     {
365       "name" : "hasListener",
366       "desc" : "Checks to see if this object has any listeners for a specified event",
367       "isStatic" : false,
368       "isConstructor" : false,
369       "isPrivate" : false,
370       "memberOf" : "Roo.util.Observable",
371       "example" : "",
372       "deprecated" : "",
373       "since" : "",
374       "see" : "",
375       "params" : [
376         {
377           "name" : "eventName",
378           "type" : "String",
379           "desc" : "The name of the event to check for",
380           "isOptional" : false
381         }
382       ],
383       "returns" : [
384         {
385           "name" : "",
386           "type" : "Boolean",
387           "desc" : "True if the event is being listened for, else false"
388         }
389       ]
390     },
391     {
392       "name" : "capture",
393       "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
394       "isStatic" : true,
395       "isConstructor" : false,
396       "isPrivate" : false,
397       "memberOf" : "Roo.util.Observable",
398       "example" : "",
399       "deprecated" : "",
400       "since" : "",
401       "see" : "",
402       "params" : [
403         {
404           "name" : "o",
405           "type" : "Observable",
406           "desc" : "The Observable to capture",
407           "isOptional" : false
408         },
409         {
410           "name" : "fn",
411           "type" : "Function",
412           "desc" : "The function to call",
413           "isOptional" : false
414         },
415         {
416           "name" : "scope",
417           "type" : "Object",
418           "desc" : "(optional) The scope (this object) for the fn",
419           "isOptional" : false
420         }
421       ],
422       "returns" : [
423       ]
424     },
425     {
426       "name" : "addListener",
427       "desc" : "Appends an event handler to this component",
428       "isStatic" : false,
429       "isConstructor" : false,
430       "isPrivate" : false,
431       "memberOf" : "Roo.util.Observable",
432       "example" : "",
433       "deprecated" : "",
434       "since" : "",
435       "see" : "",
436       "params" : [
437         {
438           "name" : "eventName",
439           "type" : "String",
440           "desc" : "The type of event to listen for",
441           "isOptional" : false
442         },
443         {
444           "name" : "handler",
445           "type" : "Function",
446           "desc" : "The method the event invokes",
447           "isOptional" : false
448         },
449         {
450           "name" : "scope",
451           "type" : "Object",
452           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
453           "isOptional" : false
454         },
455         {
456           "name" : "options",
457           "type" : "Object",
458           "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)\n\t\t<pre><code>\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n    \t\tdelay: 100,\n    \t\tforumId: 4\n\t\t});\n\t\t</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<pre><code>\n\t\tel.on({\n\t\t\t'click': {\n        \t\tfn: this.onClick,\n        \t\tscope: this,\n        \t\tdelay: 100\n    \t\t}, \n    \t\t'mouseover': {\n        \t\tfn: this.onMouseOver,\n        \t\tscope: this\n    \t\t},\n    \t\t'mouseout': {\n        \t\tfn: this.onMouseOut,\n        \t\tscope: this\n    \t\t}\n\t\t});\n\t\t</code></pre>\n<p>\nOr a shorthand syntax which passes the same scope object to all handlers:\n     \t<pre><code>\n\t\tel.on({\n\t\t\t'click': this.onClick,\n    \t\t'mouseover': this.onMouseOver,\n    \t\t'mouseout': this.onMouseOut,\n    \t\tscope: this\n\t\t});\n\t\t</code></pre>",
459           "isOptional" : false
460         }
461       ],
462       "returns" : [
463       ]
464     }
465   ],
466   "events" : [
467     {
468       "name" : "requestcomplete",
469       "desc" : "Fires if the request was successfully completed.",
470       "memberOf" : "Roo.data.Connection",
471       "example" : "",
472       "deprecated" : "",
473       "since" : "",
474       "see" : "",
475       "params" : [
476         {
477           "name" : "conn",
478           "type" : "Connection",
479           "desc" : "This Connection object.",
480           "isOptional" : false
481         },
482         {
483           "name" : "response",
484           "type" : "Object",
485           "desc" : "The XHR object containing the response data.\nSee {@link http://www.w3.org/TR/XMLHttpRequest/} for details.",
486           "isOptional" : false
487         },
488         {
489           "name" : "options",
490           "type" : "Object",
491           "desc" : "The options config object passed to the {@link #request} method.",
492           "isOptional" : false
493         }
494       ],
495       "returns" : [
496       ]
497     },
498     {
499       "name" : "beforerequest",
500       "desc" : "Fires before a network request is made to retrieve a data object.",
501       "memberOf" : "Roo.data.Connection",
502       "example" : "",
503       "deprecated" : "",
504       "since" : "",
505       "see" : "",
506       "params" : [
507         {
508           "name" : "conn",
509           "type" : "Connection",
510           "desc" : "This Connection object.",
511           "isOptional" : false
512         },
513         {
514           "name" : "options",
515           "type" : "Object",
516           "desc" : "The options config object passed to the {@link #request} method.",
517           "isOptional" : false
518         }
519       ],
520       "returns" : [
521       ]
522     },
523     {
524       "name" : "requestexception",
525       "desc" : "Fires if an error HTTP status was returned from the server.\nSee {@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html} for details of HTTP status codes.",
526       "memberOf" : "Roo.data.Connection",
527       "example" : "",
528       "deprecated" : "",
529       "since" : "",
530       "see" : "",
531       "params" : [
532         {
533           "name" : "conn",
534           "type" : "Connection",
535           "desc" : "This Connection object.",
536           "isOptional" : false
537         },
538         {
539           "name" : "response",
540           "type" : "Object",
541           "desc" : "The XHR object containing the response data.\nSee {@link http://www.w3.org/TR/XMLHttpRequest/} for details.",
542           "isOptional" : false
543         },
544         {
545           "name" : "options",
546           "type" : "Object",
547           "desc" : "The options config object passed to the {@link #request} method.",
548           "isOptional" : false
549         }
550       ],
551       "returns" : [
552       ]
553     }
554   ]
555 }