d9a1b1c2087c42c0e8416f654784675ad2263714
[roojs1] / docs / symbols / Roo.data.HttpProxy.json
1 {
2   "name" : "Roo.data.HttpProxy",
3   "augments" : [
4     "Roo.data.DataProxy",
5     "Roo.util.Observable"
6   ],
7   "childClasses" : {  },
8   "tree_children" : [],
9   "tree_parent" : [],
10   "desc" : "An implementation of {@link Roo.data.DataProxy} that reads a data object from an {@link Roo.data.Connection} object\nconfigured to reference a certain URL.<br><br>\n<p>\n<em>Note that this class cannot be used to retrieve data from a domain other than the domain\nfrom which the running page was served.<br><br>\n<p>\nFor cross-domain access to remote data, use an {@link Roo.data.ScriptTagProxy}.</em><br><br>\n<p>\nBe aware that to enable the browser to parse an XML document, the server must set\nthe Content-Type header in the HTTP response to \"text/xml\".",
11   "isSingleton" : false,
12   "isStatic" : false,
13   "isBuiltin" : false,
14   "isAbstract" : false,
15   "isBuilderTop" : false,
16   "memberOf" : "HttpProxy",
17   "example" : "",
18   "deprecated" : "",
19   "since" : "",
20   "see" : "",
21   "params" : [
22     {
23       "name" : "conn",
24       "type" : "Object",
25       "desc" : "Connection config options to add to each request (e.g. {url: 'foo.php'} or\nan {@link Roo.data.Connection} object.  If a Connection config is passed, the singleton {@link Roo.Ajax} object\nwill be used to make the request.",
26       "isOptional" : false
27     }
28   ],
29   "returns" : [],
30   "throws" : "",
31   "requires" : "",
32   "config" : [
33     {
34       "name" : "listeners",
35       "type" : "Object",
36       "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>",
37       "memberOf" : "Roo.util.Observable"
38     },
39     {
40       "name" : "method",
41       "type" : "String",
42       "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)",
43       "memberOf" : "Roo.data.HttpProxy"
44     },
45     {
46       "name" : "timeout",
47       "type" : "Number",
48       "desc" : "(Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)",
49       "memberOf" : "Roo.data.HttpProxy"
50     },
51     {
52       "name" : "autoAbort",
53       "type" : "Boolean",
54       "desc" : "(Optional) Whether this request should abort any pending requests. (defaults to false)",
55       "memberOf" : "Roo.data.HttpProxy"
56     },
57     {
58       "name" : "url",
59       "type" : "String",
60       "desc" : "(Optional) The default URL to be used for requests to the server. (defaults to undefined)",
61       "memberOf" : "Roo.data.HttpProxy"
62     },
63     {
64       "name" : "extraParams",
65       "type" : "Object",
66       "desc" : "(Optional) An object containing properties which are used as\nextra parameters to each request made by this object. (defaults to undefined)",
67       "memberOf" : "Roo.data.HttpProxy"
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.data.HttpProxy"
74     },
75     {
76       "name" : "defaultHeaders",
77       "type" : "Object",
78       "desc" : "(Optional) An object containing request headers which are added\n to each request made by this object. (defaults to undefined)",
79       "memberOf" : "Roo.data.HttpProxy"
80     }
81   ],
82   "methods" : [
83     {
84       "name" : "getConnection",
85       "type" : "function",
86       "desc" : "Return the {@link Roo.data.Connection} object being used by this Proxy.",
87       "sig" : "()\n{\n\n}",
88       "static" : false,
89       "memberOf" : "",
90       "isStatic" : false,
91       "isConstructor" : false,
92       "isPrivate" : false,
93       "example" : "",
94       "deprecated" : "",
95       "since" : "",
96       "see" : "",
97       "exceptions" : "",
98       "requires" : "",
99       "params" : [],
100       "returns" : [
101         {
102           "name" : "",
103           "type" : "Connection",
104           "desc" : "The Connection object. This object may be used to subscribe to events on\na finer-grained basis than the DataProxy events."
105         }
106       ]
107     },
108     {
109       "name" : "load",
110       "type" : "function",
111       "desc" : "Load data from the configured {@link Roo.data.Connection}, read the data object into\na block of Roo.data.Records using the passed {@link Roo.data.DataReader} implementation, and\nprocess that block using the passed callback.",
112       "sig" : "(params, reader, callback, scope, arg)",
113       "static" : false,
114       "memberOf" : "",
115       "isStatic" : false,
116       "isConstructor" : false,
117       "isPrivate" : false,
118       "example" : "",
119       "deprecated" : "",
120       "since" : "",
121       "see" : "",
122       "exceptions" : "",
123       "requires" : "",
124       "params" : [
125         {
126           "name" : "params",
127           "type" : "Object",
128           "desc" : "An object containing properties which are to be used as HTTP parameters\nfor the request to the remote server.",
129           "isOptional" : false
130         },
131         {
132           "name" : "reader",
133           "type" : "Roo.data.DataReader",
134           "desc" : "The Reader object which converts the data\nobject into a block of Roo.data.Records.",
135           "isOptional" : false
136         },
137         {
138           "name" : "callback",
139           "type" : "Function",
140           "desc" : "The function into which to pass the block of Roo.data.Records.\nThe function must be passed <ul>\n<li>The Record block object</li>\n<li>The \"arg\" argument from the load function</li>\n<li>A boolean success indicator</li>\n</ul>",
141           "isOptional" : false
142         },
143         {
144           "name" : "scope",
145           "type" : "Object",
146           "desc" : "The scope in which to call the callback",
147           "isOptional" : false
148         },
149         {
150           "name" : "arg",
151           "type" : "Object",
152           "desc" : "An optional argument which is passed to the callback as its second parameter.",
153           "isOptional" : false
154         }
155       ],
156       "returns" : []
157     },
158     {
159       "name" : "purgeListeners",
160       "type" : "function",
161       "desc" : "Removes all listeners for this object",
162       "sig" : "()\n{\n\n}",
163       "static" : false,
164       "memberOf" : "Roo.util.Observable",
165       "isStatic" : false,
166       "isConstructor" : false,
167       "isPrivate" : false,
168       "example" : "",
169       "deprecated" : "",
170       "since" : "",
171       "see" : "",
172       "exceptions" : "",
173       "requires" : "",
174       "params" : [],
175       "returns" : []
176     },
177     {
178       "name" : "on",
179       "type" : "function",
180       "desc" : "Appends an event handler to this element (shorthand for addListener)",
181       "sig" : "(eventName, handler, scope, options)",
182       "static" : false,
183       "memberOf" : "Roo.util.Observable",
184       "isStatic" : false,
185       "isConstructor" : false,
186       "isPrivate" : false,
187       "example" : "",
188       "deprecated" : "",
189       "since" : "",
190       "see" : "",
191       "exceptions" : "",
192       "requires" : "",
193       "params" : [
194         {
195           "name" : "eventName",
196           "type" : "String",
197           "desc" : "The type of event to listen for",
198           "isOptional" : false
199         },
200         {
201           "name" : "handler",
202           "type" : "Function",
203           "desc" : "The method the event invokes",
204           "isOptional" : false
205         },
206         {
207           "name" : "scope",
208           "type" : "Object",
209           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
210           "isOptional" : false
211         },
212         {
213           "name" : "options",
214           "type" : "Object",
215           "desc" : "(optional)",
216           "isOptional" : false
217         }
218       ],
219       "returns" : []
220     },
221     {
222       "name" : "un",
223       "type" : "function",
224       "desc" : "Removes a listener (shorthand for removeListener)",
225       "sig" : "(eventName, handler, scope)",
226       "static" : false,
227       "memberOf" : "Roo.util.Observable",
228       "isStatic" : false,
229       "isConstructor" : false,
230       "isPrivate" : false,
231       "example" : "",
232       "deprecated" : "",
233       "since" : "",
234       "see" : "",
235       "exceptions" : "",
236       "requires" : "",
237       "params" : [
238         {
239           "name" : "eventName",
240           "type" : "String",
241           "desc" : "The type of event to listen for",
242           "isOptional" : false
243         },
244         {
245           "name" : "handler",
246           "type" : "Function",
247           "desc" : "The handler to remove",
248           "isOptional" : false
249         },
250         {
251           "name" : "scope",
252           "type" : "Object",
253           "desc" : "(optional) The scope (this object) for the handler",
254           "isOptional" : false
255         }
256       ],
257       "returns" : []
258     },
259     {
260       "name" : "addEvents",
261       "type" : "function",
262       "desc" : "Used to define events on this Observable",
263       "sig" : "(object)",
264       "static" : false,
265       "memberOf" : "Roo.util.Observable",
266       "isStatic" : false,
267       "isConstructor" : false,
268       "isPrivate" : false,
269       "example" : "",
270       "deprecated" : "",
271       "since" : "",
272       "see" : "",
273       "exceptions" : "",
274       "requires" : "",
275       "params" : [
276         {
277           "name" : "object",
278           "type" : "Object",
279           "desc" : "The object with the events defined",
280           "isOptional" : false
281         }
282       ],
283       "returns" : []
284     },
285     {
286       "name" : "releaseCapture",
287       "type" : "function",
288       "desc" : "Removes <b>all</b> added captures from the Observable.",
289       "sig" : "(o)",
290       "static" : true,
291       "memberOf" : "Roo.util.Observable",
292       "isStatic" : true,
293       "isConstructor" : false,
294       "isPrivate" : false,
295       "example" : "",
296       "deprecated" : "",
297       "since" : "",
298       "see" : "",
299       "exceptions" : "",
300       "requires" : "",
301       "params" : [
302         {
303           "name" : "o",
304           "type" : "Observable",
305           "desc" : "The Observable to release",
306           "isOptional" : false
307         }
308       ],
309       "returns" : []
310     },
311     {
312       "name" : "removeListener",
313       "type" : "function",
314       "desc" : "Removes a listener",
315       "sig" : "(eventName, handler, scope)",
316       "static" : false,
317       "memberOf" : "Roo.util.Observable",
318       "isStatic" : false,
319       "isConstructor" : false,
320       "isPrivate" : false,
321       "example" : "",
322       "deprecated" : "",
323       "since" : "",
324       "see" : "",
325       "exceptions" : "",
326       "requires" : "",
327       "params" : [
328         {
329           "name" : "eventName",
330           "type" : "String",
331           "desc" : "The type of event to listen for",
332           "isOptional" : false
333         },
334         {
335           "name" : "handler",
336           "type" : "Function",
337           "desc" : "The handler to remove",
338           "isOptional" : false
339         },
340         {
341           "name" : "scope",
342           "type" : "Object",
343           "desc" : "(optional) The scope (this object) for the handler",
344           "isOptional" : false
345         }
346       ],
347       "returns" : []
348     },
349     {
350       "name" : "fireEvent",
351       "type" : "function",
352       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
353       "sig" : "(eventName, args)",
354       "static" : false,
355       "memberOf" : "Roo.util.Observable",
356       "isStatic" : false,
357       "isConstructor" : false,
358       "isPrivate" : false,
359       "example" : "",
360       "deprecated" : "",
361       "since" : "",
362       "see" : "",
363       "exceptions" : "",
364       "requires" : "",
365       "params" : [
366         {
367           "name" : "eventName",
368           "type" : "String",
369           "desc" : "",
370           "isOptional" : false
371         },
372         {
373           "name" : "args",
374           "type" : "Object...",
375           "desc" : "Variable number of parameters are passed to handlers",
376           "isOptional" : false
377         }
378       ],
379       "returns" : [
380         {
381           "name" : "",
382           "type" : "Boolean",
383           "desc" : "returns false if any of the handlers return false otherwise it returns true"
384         }
385       ]
386     },
387     {
388       "name" : "hasListener",
389       "type" : "function",
390       "desc" : "Checks to see if this object has any listeners for a specified event",
391       "sig" : "(eventName)",
392       "static" : false,
393       "memberOf" : "Roo.util.Observable",
394       "isStatic" : false,
395       "isConstructor" : false,
396       "isPrivate" : false,
397       "example" : "",
398       "deprecated" : "",
399       "since" : "",
400       "see" : "",
401       "exceptions" : "",
402       "requires" : "",
403       "params" : [
404         {
405           "name" : "eventName",
406           "type" : "String",
407           "desc" : "The name of the event to check for",
408           "isOptional" : false
409         }
410       ],
411       "returns" : [
412         {
413           "name" : "",
414           "type" : "Boolean",
415           "desc" : "True if the event is being listened for, else false"
416         }
417       ]
418     },
419     {
420       "name" : "capture",
421       "type" : "function",
422       "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.",
423       "sig" : "(o, fn, scope)",
424       "static" : true,
425       "memberOf" : "Roo.util.Observable",
426       "isStatic" : true,
427       "isConstructor" : false,
428       "isPrivate" : false,
429       "example" : "",
430       "deprecated" : "",
431       "since" : "",
432       "see" : "",
433       "exceptions" : "",
434       "requires" : "",
435       "params" : [
436         {
437           "name" : "o",
438           "type" : "Observable",
439           "desc" : "The Observable to capture",
440           "isOptional" : false
441         },
442         {
443           "name" : "fn",
444           "type" : "Function",
445           "desc" : "The function to call",
446           "isOptional" : false
447         },
448         {
449           "name" : "scope",
450           "type" : "Object",
451           "desc" : "(optional) The scope (this object) for the fn",
452           "isOptional" : false
453         }
454       ],
455       "returns" : []
456     },
457     {
458       "name" : "addListener",
459       "type" : "function",
460       "desc" : "Appends an event handler to this component",
461       "sig" : "(eventName, handler, scope, options)",
462       "static" : false,
463       "memberOf" : "Roo.util.Observable",
464       "isStatic" : false,
465       "isConstructor" : false,
466       "isPrivate" : false,
467       "example" : "",
468       "deprecated" : "",
469       "since" : "",
470       "see" : "",
471       "exceptions" : "",
472       "requires" : "",
473       "params" : [
474         {
475           "name" : "eventName",
476           "type" : "String",
477           "desc" : "The type of event to listen for",
478           "isOptional" : false
479         },
480         {
481           "name" : "handler",
482           "type" : "Function",
483           "desc" : "The method the event invokes",
484           "isOptional" : false
485         },
486         {
487           "name" : "scope",
488           "type" : "Object",
489           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
490           "isOptional" : false
491         },
492         {
493           "name" : "options",
494           "type" : "Object",
495           "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>",
496           "isOptional" : false
497         }
498       ],
499       "returns" : []
500     }
501   ],
502   "events" : [
503     {
504       "name" : "load",
505       "type" : "function",
506       "desc" : "Fires before the load method's callback is called.",
507       "sig" : "function (This, o, arg)\n{\n\n}",
508       "memberOf" : "Roo.data.DataProxy",
509       "example" : "",
510       "deprecated" : "",
511       "since" : "",
512       "see" : "",
513       "params" : [
514         {
515           "name" : "This",
516           "type" : "Object",
517           "desc" : "DataProxy object.",
518           "isOptional" : false
519         },
520         {
521           "name" : "o",
522           "type" : "Object",
523           "desc" : "The data object.",
524           "isOptional" : false
525         },
526         {
527           "name" : "arg",
528           "type" : "Object",
529           "desc" : "The callback argument object passed to the load function.",
530           "isOptional" : false
531         }
532       ],
533       "returns" : []
534     },
535     {
536       "name" : "beforeload",
537       "type" : "function",
538       "desc" : "Fires before a network request is made to retrieve a data object.",
539       "sig" : "function (This, params)\n{\n\n}",
540       "memberOf" : "Roo.data.DataProxy",
541       "example" : "",
542       "deprecated" : "",
543       "since" : "",
544       "see" : "",
545       "params" : [
546         {
547           "name" : "This",
548           "type" : "Object",
549           "desc" : "DataProxy object.",
550           "isOptional" : false
551         },
552         {
553           "name" : "params",
554           "type" : "Object",
555           "desc" : "The params parameter to the load function.",
556           "isOptional" : false
557         }
558       ],
559       "returns" : []
560     },
561     {
562       "name" : "loadexception",
563       "type" : "function",
564       "desc" : "Fires if an Exception occurs during data retrieval.",
565       "sig" : "function (This, o, arg, e)\n{\n\n}",
566       "memberOf" : "Roo.data.DataProxy",
567       "example" : "",
568       "deprecated" : "",
569       "since" : "",
570       "see" : "",
571       "params" : [
572         {
573           "name" : "This",
574           "type" : "Object",
575           "desc" : "DataProxy object.",
576           "isOptional" : false
577         },
578         {
579           "name" : "o",
580           "type" : "Object",
581           "desc" : "The data object.",
582           "isOptional" : false
583         },
584         {
585           "name" : "arg",
586           "type" : "Object",
587           "desc" : "The callback argument object passed to the load function.",
588           "isOptional" : false
589         },
590         {
591           "name" : "e",
592           "type" : "Object",
593           "desc" : "The Exception.",
594           "isOptional" : false
595         }
596       ],
597       "returns" : []
598     }
599   ]
600 }