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