1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.data.Connection</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.data.Connection-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.data.Connection-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.data.Connection-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.data.Connection-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <div class="inheritance res-block">
46 <pre class="res-block-inner"><a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
47 <img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.data.Connection
52 <!-- ============================== class title / details ============================ -->
55 <h1 class="classTitle">
57 Class Roo.data.Connection
60 <table cellspacing="0" class="class-summary-table">
62 <tr><td class="label">Package:</td><td class="hd-info">Roo.data</td></tr>
64 <tr><td class="label">Defined In:</td><td class="hd-info">
66 <a href="./src/Roo_data_Connection.js.html">Roo/data/Connection.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">Connection</td></tr>
72 <tr><td class="label">Subclasses:</td><td class="hd-info">
73 <a href="./Roo.Ajax.html#constructor" roo:cls="Roo.Ajax.html#constructor">Roo.Ajax</a>
81 <tr><td class="label">Extends:</td><td class="hd-info">
82 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
90 <!-- ============================== class summary ========================== -->
91 <div class="description">
92 The class encapsulates a connection to the page's originating domain, allowing requests to be made<br/>either to a configured URL, or to a URL specified at request time.<br><br><br/><p><br/>Requests made by this class are asynchronous, and will return immediately. No data from<br/>the server will be available to the statement immediately following the {<b>link</b> <b>request</b>} call.<br/>To process returned data, use a callback in the request options object, or an event listener.</p><br><br/><p><br/>Note: If you are doing a file upload, you will not get a normal response object sent back to<br/>your callback or event handler. Since the upload is handled via in IFRAME, there is no XMLHttpRequest.<br/>The response object is created using the innerHTML of the IFRAME's document as the responseText<br/>property and, if present, the IFRAME's XML document as the responseXML property.</p><br><br/>This means that a valid XML or HTML document must be returned. If JSON data is required, it is suggested<br/>that it be placed either inside a <textarea> in an HTML document and retrieved from the responseText<br/>using a regex, or inside a CDATA section in an XML document and retrieved from the responseXML using<br/>standard DOM methods.
96 <!-- ============================== Class comment block... ========================== -->
98 <div class="comments">
99 <b>Class Comments / Notes</B> =>
100 <u onclick="parent.CommentDialog.showCommentId = 'Roo.data.Connection';">[Add Your comment/notes about this class]</u>
102 <iframe frameborder="0" id="comments-Roo.data" style="border: none;width:100%;"
103 src="/blog.php/GtkDjsComments/Roo.data.Connection.html"></iframe>
108 <!-- ============================== config options ========================== -->
113 <div class="hr"></div>
114 <a id="Roo.data.Connection-configs"></a>
120 <table cellspacing="0" class="member-table">
121 <caption>Config Options (Usually are also Properties)</caption>
125 <th class="sig-header" colspan="2">Options</th>
127 <th class="msource-header">Defined By</th>
134 <tr class="config-row expandable config-row-alt0 notInherited">
135 <td class="micon"><a class="exi" href="#expand"> </a></td>
138 <a id="Roo.data.Connection-cfg-autoAbort" name=".autoAbort"></a>
139 <div class="fixedFont">
140 <b class="itemname">autoAbort</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
146 <div class="short">(Optional) Whether this request should abort any pending requests.</div>
151 (Optional) Whether this request should abort any pending requests. (defaults to false)
167 <tr class="config-row expandable config-row-alt1 notInherited">
168 <td class="micon"><a class="exi" href="#expand"> </a></td>
171 <a id="Roo.data.Connection-cfg-defaultHeaders" name=".defaultHeaders"></a>
172 <div class="fixedFont">
173 <b class="itemname">defaultHeaders</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
179 <div class="short">(Optional) An object containing request headers which are added<br/> to each request made by this object.</div>
184 (Optional) An object containing request headers which are added<br/> to each request made by this object. (defaults to undefined)
200 <tr class="config-row expandable config-row-alt0 notInherited">
201 <td class="micon"><a class="exi" href="#expand"> </a></td>
204 <a id="Roo.data.Connection-cfg-disableCaching" name=".disableCaching"></a>
205 <div class="fixedFont">
206 <b class="itemname">disableCaching</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
212 <div class="short">(Optional) True to add a unique cache-buster param to GET requests.</div>
217 (Optional) True to add a unique cache-buster param to GET requests. (defaults to true)
233 <tr class="config-row expandable config-row-alt1 notInherited">
234 <td class="micon"><a class="exi" href="#expand"> </a></td>
237 <a id="Roo.data.Connection-cfg-extraParams" name=".extraParams"></a>
238 <div class="fixedFont">
239 <b class="itemname">extraParams</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
245 <div class="short">(Optional) An object containing properties which are used as<br/>extra parameters to each request made by this object.</div>
250 (Optional) An object containing properties which are used as<br/>extra parameters to each request made by this object. (defaults to undefined)
266 <tr class="config-row expandable config-row-alt0">
267 <td class="micon"><a class="exi" href="#expand"> </a></td>
270 <a id="Roo.util.Observable-cfg-listeners" name=".listeners"></a>
271 <div class="fixedFont">
272 <b class="itemname">listeners</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
278 <div class="short">list of events and functions to call for this object, <br/>For example :<br/><pre><code><br/> listeners : { <br/> 'click' : function(e) {<br/> .</div>
283 list of events and functions to call for this object, <br/>For example :<br/><pre><code><br/> listeners : { <br/> 'click' : function(e) {<br/> ..... <br/> } ,<br/> .... <br/> } <br/> </code></pre>
293 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
299 <tr class="config-row expandable config-row-alt1 notInherited">
300 <td class="micon"><a class="exi" href="#expand"> </a></td>
303 <a id="Roo.data.Connection-cfg-method" name=".method"></a>
304 <div class="fixedFont">
305 <b class="itemname">method</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
311 <div class="short">(Optional) The default HTTP method to be used for requests.</div>
316 (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)
332 <tr class="config-row expandable config-row-alt0 notInherited">
333 <td class="micon"><a class="exi" href="#expand"> </a></td>
336 <a id="Roo.data.Connection-cfg-timeout" name=".timeout"></a>
337 <div class="fixedFont">
338 <b class="itemname">timeout</b> : <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
344 <div class="short">(Optional) The timeout in milliseconds to be used for requests.</div>
349 (Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)
365 <tr class="config-row expandable config-row-alt1 notInherited">
366 <td class="micon"><a class="exi" href="#expand"> </a></td>
369 <a id="Roo.data.Connection-cfg-url" name=".url"></a>
370 <div class="fixedFont">
371 <b class="itemname">url</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
377 <div class="short">(Optional) The default URL to be used for requests to the server.</div>
382 (Optional) The default URL to be used for requests to the server. (defaults to undefined)
408 <!-- ============================== public properties ==================== -->
412 <a id="Roo.data.Connection-props"></a>
418 <table cellspacing="0" class="member-table">
419 <caption class="Empty">Public Properties - Has None</caption>
425 <!-- ============================== methods summary / details ======================== -->
428 <a id="Roo.data.Connection-methods"></a>
429 <!-- constructor?? -->
436 <!-- then dynamics first -->
443 <table cellspacing="0" class="member-table">
444 <caption>Public Methods</caption>
446 <th class="sig-header" colspan="2">Method</th>
447 <th class="msource-header">Defined By</th>
457 <tr class="method-row config-row-alt0 expandable notInherited">
458 <td class="micon"><a class="exi" href="#expand"> </a></td>
462 <a id="Roo.data-method-Connection" name=".Connection"></a>
463 <div class="fixedFont">
464 <span class="attributes">new <B>Roo.data.</B></span><b class="itemname">Connection</b>
466 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
474 <div class="short">Create a new Roo.data.Connection</div>
481 Create a new Roo.data.Connection
484 <dl class="detailList">
485 <dt class="heading">Parameters:</dt>
488 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>config</b>
491 <dd>a configuration object.</dd>
515 <tr class="method-row config-row-alt1 expandable notInherited">
516 <td class="micon"><a class="exi" href="#expand"> </a></td>
520 <a id="Roo.data.Connection-method-abort" name=".abort"></a>
521 <div class="fixedFont">
522 <span class="attributes"></span><b class="itemname">abort</b>
524 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>transactionId</i></B>)
531 <div class="short">Aborts any outstanding request.</div>
537 Aborts any outstanding request.
544 <dl class="detailList">
545 <dt class="heading">Parameters:</dt>
548 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>transactionId</b>
551 <dd>(Optional) defaults to the last transaction</dd>
577 <tr class="method-row config-row-alt0 expandable">
578 <td class="micon"><a class="exi" href="#expand"> </a></td>
582 <a id="Roo.util.Observable-method-addEvents" name=".addEvents"></a>
583 <div class="fixedFont">
584 <span class="attributes"></span><b class="itemname">addEvents</b>
586 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>object</i></B>)
593 <div class="short">Used to define events on this Observable</div>
599 Used to define events on this Observable
606 <dl class="detailList">
607 <dt class="heading">Parameters:</dt>
610 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>object</b>
613 <dd>The object with the events defined</dd>
633 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
639 <tr class="method-row config-row-alt1 expandable">
640 <td class="micon"><a class="exi" href="#expand"> </a></td>
644 <a id="Roo.util.Observable-method-addListener" name=".addListener"></a>
645 <div class="fixedFont">
646 <span class="attributes"></span><b class="itemname">addListener</b>
648 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
655 <div class="short">Appends an event handler to this component</div>
661 Appends an event handler to this component
668 <dl class="detailList">
669 <dt class="heading">Parameters:</dt>
672 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
675 <dd>The type of event to listen for</dd>
678 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
681 <dd>The method the event invokes</dd>
684 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
687 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
690 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
693 <dd>(optional) An object containing handler configuration<br/>properties. This may contain any of the following properties:<ul><br/><li>scope {Object} The scope in which to execute the handler function. The handler function's "this" context.</li><br/><li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li><br/><li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li><br/><li>buffer {Number} Causes the handler to be scheduled to run in an {<b>link</b> Roo.util.DelayedTask} delayed<br/>by the specified number of milliseconds. If the event fires again within that time, the original<br/>handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li><br/></ul><br><br/><p><br/><b>Combining Options</b><br><br/>Using the options argument, it is possible to combine different types of listeners:<br><br/><br><br/>A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<br/> <pre><code><br/> el.on('click', this.onClick, this, {<br/> single: true,<br/> delay: 100,<br/> forumId: 4<br/> });<br/> </code></pre><br/><p><br/><b>Attaching multiple handlers in 1 call</b><br><br/>The method also allows for a single argument to be passed which is a config object containing properties<br/>which specify multiple handlers.<br/><pre><code><br/> el.on({<br/> 'click': {<br/> fn: this.onClick,<br/> scope: this,<br/> delay: 100<br/> }, <br/> 'mouseover': {<br/> fn: this.onMouseOver,<br/> scope: this<br/> },<br/> 'mouseout': {<br/> fn: this.onMouseOut,<br/> scope: this<br/> }<br/> });<br/> </code></pre><br/><p><br/>Or a shorthand syntax which passes the same scope object to all handlers:<br/> <pre><code><br/> el.on({<br/> 'click': this.onClick,<br/> 'mouseover': this.onMouseOver,<br/> 'mouseout': this.onMouseOut,<br/> scope: this<br/> });<br/> </code></pre></dd>
713 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
719 <tr class="method-row config-row-alt0 expandable">
720 <td class="micon"><a class="exi" href="#expand"> </a></td>
724 <a id="Roo.util.Observable-method-fireEvent" name=".fireEvent"></a>
725 <div class="fixedFont">
726 <span class="attributes"></span><b class="itemname">fireEvent</b>
728 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object...</a> <B><i>args</i></B>)
734 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
743 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
749 Fires the specified event with the passed parameters (minus the event name).
756 <dl class="detailList">
757 <dt class="heading">Parameters:</dt>
760 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
766 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object...</a></span> <b>args</b>
769 <dd>Variable number of parameters are passed to handlers</dd>
777 <dl class="detailList">
778 <dt class="heading">Returns:</dt>
780 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> returns false if any of the handlers return false otherwise it returns true</dd>
796 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
802 <tr class="method-row config-row-alt1 expandable">
803 <td class="micon"><a class="exi" href="#expand"> </a></td>
807 <a id="Roo.util.Observable-method-hasListener" name=".hasListener"></a>
808 <div class="fixedFont">
809 <span class="attributes"></span><b class="itemname">hasListener</b>
811 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>)
817 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
826 <div class="short">Checks to see if this object has any listeners for a specified event</div>
832 Checks to see if this object has any listeners for a specified event
839 <dl class="detailList">
840 <dt class="heading">Parameters:</dt>
843 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
846 <dd>The name of the event to check for</dd>
854 <dl class="detailList">
855 <dt class="heading">Returns:</dt>
857 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> True if the event is being listened for, else false</dd>
873 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
879 <tr class="method-row config-row-alt0 expandable notInherited">
880 <td class="micon"><a class="exi" href="#expand"> </a></td>
884 <a id="Roo.data.Connection-method-isLoading" name=".isLoading"></a>
885 <div class="fixedFont">
886 <span class="attributes"></span><b class="itemname">isLoading</b>
888 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>transactionId</i></B>)
894 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
903 <div class="short">Determine whether this object has a request outstanding.</div>
909 Determine whether this object has a request outstanding.
916 <dl class="detailList">
917 <dt class="heading">Parameters:</dt>
920 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>transactionId</b>
923 <dd>(Optional) defaults to the last transaction</dd>
931 <dl class="detailList">
932 <dt class="heading">Returns:</dt>
934 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> True if there is an outstanding request.</dd>
956 <tr class="method-row config-row-alt1 expandable">
957 <td class="micon"><a class="exi" href="#expand"> </a></td>
961 <a id="Roo.util.Observable-method-on" name=".on"></a>
962 <div class="fixedFont">
963 <span class="attributes"></span><b class="itemname">on</b>
965 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
972 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
978 Appends an event handler to this element (shorthand for addListener)
985 <dl class="detailList">
986 <dt class="heading">Parameters:</dt>
989 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
992 <dd>The type of event to listen for</dd>
995 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
998 <dd>The method the event invokes</dd>
1001 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1004 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
1007 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
1028 <td class="msource">
1030 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1036 <tr class="method-row config-row-alt0 expandable">
1037 <td class="micon"><a class="exi" href="#expand"> </a></td>
1041 <a id="Roo.util.Observable-method-purgeListeners" name=".purgeListeners"></a>
1042 <div class="fixedFont">
1043 <span class="attributes"></span><b class="itemname">purgeListeners</b>
1052 <div class="short">Removes all listeners for this object</div>
1058 Removes all listeners for this object
1079 <td class="msource">
1081 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1087 <tr class="method-row config-row-alt1 expandable">
1088 <td class="micon"><a class="exi" href="#expand"> </a></td>
1092 <a id="Roo.util.Observable-method-removeListener" name=".removeListener"></a>
1093 <div class="fixedFont">
1094 <span class="attributes"></span><b class="itemname">removeListener</b>
1096 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
1103 <div class="short">Removes a listener</div>
1116 <dl class="detailList">
1117 <dt class="heading">Parameters:</dt>
1120 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1123 <dd>The type of event to listen for</dd>
1126 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1129 <dd>The handler to remove</dd>
1132 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1135 <dd>(optional) The scope (this object) for the handler</dd>
1153 <td class="msource">
1155 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1161 <tr class="method-row config-row-alt0 expandable notInherited">
1162 <td class="micon"><a class="exi" href="#expand"> </a></td>
1166 <a id="Roo.data.Connection-method-request" name=".request"></a>
1167 <div class="fixedFont">
1168 <span class="attributes"></span><b class="itemname">request</b>
1170 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
1176 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1185 <div class="short">Sends an HTTP request to a remote server.</div>
1191 Sends an HTTP request to a remote server.
1198 <dl class="detailList">
1199 <dt class="heading">Parameters:</dt>
1202 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
1205 <dd>An object which may contain the following properties:<ul><br/><li><b>url</b> {String} (Optional) The URL to which to send the request. Defaults to configured URL</li><br/><li><b>params</b> {Object/String/Function} (Optional) An object containing properties which are used as parameters to the<br/>request, a url encoded string or a function to call to get either.</li><br/><li><b>method</b> {String} (Optional) The HTTP method to use for the request. Defaults to the configured method, or<br/>if no method was configured, "GET" if no parameters are being sent, and "POST" if parameters are being sent.</li><br/><li><b>callback</b> {Function} (Optional) The function to be called upon receipt of the HTTP response.<br/>The callback is called regardless of success or failure and is passed the following parameters:<ul><br/><li>options {Object} The parameter to the request call.</li><br/><li>success {Boolean} True if the request succeeded.</li><br/><li>response {Object} The XMLHttpRequest object containing the response data.</li><br/></ul></li><br/><li><b>success</b> {Function} (Optional) The function to be called upon success of the request.<br/>The callback is passed the following parameters:<ul><br/><li>response {Object} The XMLHttpRequest object containing the response data.</li><br/><li>options {Object} The parameter to the request call.</li><br/></ul></li><br/><li><b>failure</b> {Function} (Optional) The function to be called upon failure of the request.<br/>The callback is passed the following parameters:<ul><br/><li>response {Object} The XMLHttpRequest object containing the response data.</li><br/><li>options {Object} The parameter to the request call.</li><br/></ul></li><br/><li><b>scope</b> {Object} (Optional) The scope in which to execute the callbacks: The "this" object<br/>for the callback function. Defaults to the browser window.</li><br/><li><b>form</b> {Object/String} (Optional) A form object or id to pull parameters from.</li><br/><li><b>isUpload</b> {Boolean} (Optional) True if the form object is a file upload (will usually be automatically detected).</li><br/><li><b>headers</b> {Object} (Optional) Request headers to set for the request.</li><br/><li><b>xmlData</b> {Object} (Optional) XML document to use for the post. Note: This will be used instead of<br/>params for the post data. Any params will be appended to the URL.</li><br/><li><b>disableCaching</b> {Boolean} (Optional) True to add a unique cache-buster param to GET requests.</li><br/></ul></dd>
1213 <dl class="detailList">
1214 <dt class="heading">Returns:</dt>
1216 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> transactionId</dd>
1230 <td class="msource">
1238 <tr class="method-row config-row-alt1 expandable">
1239 <td class="micon"><a class="exi" href="#expand"> </a></td>
1243 <a id="Roo.util.Observable-method-un" name=".un"></a>
1244 <div class="fixedFont">
1245 <span class="attributes"></span><b class="itemname">un</b>
1247 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
1254 <div class="short">Removes a listener (shorthand for removeListener)</div>
1260 Removes a listener (shorthand for removeListener)
1267 <dl class="detailList">
1268 <dt class="heading">Parameters:</dt>
1271 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1274 <dd>The type of event to listen for</dd>
1277 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1280 <dd>The handler to remove</dd>
1283 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1286 <dd>(optional) The scope (this object) for the handler</dd>
1304 <td class="msource">
1306 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1315 <!-- ============================== events summary / details ======================== -->
1318 <a id="Roo.data.Connection-events"></a>
1327 <table cellspacing="0" class="member-table">
1328 <caption>Events</caption>
1331 <th class="sig-header" colspan="2">Event</th>
1332 <th class="msource-header">Defined By</th>
1341 <tr class="method-row expandable config-row-alt0 notInherited">
1342 <td class="micon"><a class="exi" href="#expand"> </a></td>
1345 <a id="Roo.data.Connection-event-*beforerequest"></a>
1347 <div class="fixedFont">
1348 <b class="itemname">beforerequest</b> (Connection <B><i>conn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
1354 <div class="short">Fires before a network request is made to retrieve a data object.
1360 Fires before a network request is made to retrieve a data object.
1366 <dl class="detailList">
1367 <dt class="heading">Parameters:</dt>
1370 <span class="fixedFont">Connection</span> <b>conn</b>
1373 <dd>This Connection object.</dd>
1376 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
1379 <dd>The options config object passed to the {<b>link</b> <b>request</b>} method.</dd>
1397 <td class="msource">
1402 <tr class="method-row expandable config-row-alt1 notInherited">
1403 <td class="micon"><a class="exi" href="#expand"> </a></td>
1406 <a id="Roo.data.Connection-event-*requestcomplete"></a>
1408 <div class="fixedFont">
1409 <b class="itemname">requestcomplete</b> (Connection <B><i>conn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>response</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
1415 <div class="short">Fires if the request was successfully completed.
1421 Fires if the request was successfully completed.
1427 <dl class="detailList">
1428 <dt class="heading">Parameters:</dt>
1431 <span class="fixedFont">Connection</span> <b>conn</b>
1434 <dd>This Connection object.</dd>
1437 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>response</b>
1440 <dd>The XHR object containing the response data.<br/>See {<b>link</b> http://www.w3.org/TR/XMLHttpRequest/} for details.</dd>
1443 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
1446 <dd>The options config object passed to the {<b>link</b> <b>request</b>} method.</dd>
1464 <td class="msource">
1469 <tr class="method-row expandable config-row-alt0 notInherited">
1470 <td class="micon"><a class="exi" href="#expand"> </a></td>
1473 <a id="Roo.data.Connection-event-*requestexception"></a>
1475 <div class="fixedFont">
1476 <b class="itemname">requestexception</b> (Connection <B><i>conn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>response</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
1482 <div class="short">Fires if an error HTTP status was returned from the server.
1488 Fires if an error HTTP status was returned from the server.<br/>See {<b>link</b> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html} for details of HTTP status codes.
1494 <dl class="detailList">
1495 <dt class="heading">Parameters:</dt>
1498 <span class="fixedFont">Connection</span> <b>conn</b>
1501 <dd>This Connection object.</dd>
1504 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>response</b>
1507 <dd>The XHR object containing the response data.<br/>See {<b>link</b> http://www.w3.org/TR/XMLHttpRequest/} for details.</dd>
1510 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
1513 <dd>The options config object passed to the {<b>link</b> <b>request</b>} method.</dd>
1531 <td class="msource">
1543 <!-- ============================== footer ================================= -->
1544 <div class="fineprint" style="clear:both">
1546 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Wed Mar 09 2016 15:59:31 GMT+0800 (HKT)
1548 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>