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>
150 <div class="long">(Optional) Whether this request should abort any pending requests. (defaults to false)</div>
164 <tr class="config-row expandable config-row-alt1 notInherited">
165 <td class="micon"><a class="exi" href="#expand"> </a></td>
168 <a id="Roo.data.Connection-cfg-defaultHeaders" name=".defaultHeaders"></a>
169 <div class="fixedFont">
170 <b class="itemname">defaultHeaders</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
176 <div class="short">(Optional) An object containing request headers which are added<br/> to each request made by this object.</div>
180 <div class="long">(Optional) An object containing request headers which are added<br/> to each request made by this object. (defaults to undefined)</div>
194 <tr class="config-row expandable config-row-alt0 notInherited">
195 <td class="micon"><a class="exi" href="#expand"> </a></td>
198 <a id="Roo.data.Connection-cfg-disableCaching" name=".disableCaching"></a>
199 <div class="fixedFont">
200 <b class="itemname">disableCaching</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
206 <div class="short">(Optional) True to add a unique cache-buster param to GET requests.</div>
210 <div class="long">(Optional) True to add a unique cache-buster param to GET requests. (defaults to true)</div>
224 <tr class="config-row expandable config-row-alt1 notInherited">
225 <td class="micon"><a class="exi" href="#expand"> </a></td>
228 <a id="Roo.data.Connection-cfg-extraParams" name=".extraParams"></a>
229 <div class="fixedFont">
230 <b class="itemname">extraParams</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
236 <div class="short">(Optional) An object containing properties which are used as<br/>extra parameters to each request made by this object.</div>
240 <div class="long">(Optional) An object containing properties which are used as<br/>extra parameters to each request made by this object. (defaults to undefined)</div>
254 <tr class="config-row expandable config-row-alt0">
255 <td class="micon"><a class="exi" href="#expand"> </a></td>
258 <a id="Roo.util.Observable-cfg-listeners" name=".listeners"></a>
259 <div class="fixedFont">
260 <b class="itemname">listeners</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
266 <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>
270 <div class="long">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></div>
278 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
284 <tr class="config-row expandable config-row-alt1 notInherited">
285 <td class="micon"><a class="exi" href="#expand"> </a></td>
288 <a id="Roo.data.Connection-cfg-method" name=".method"></a>
289 <div class="fixedFont">
290 <b class="itemname">method</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
296 <div class="short">(Optional) The default HTTP method to be used for requests.</div>
300 <div class="long">(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)</div>
314 <tr class="config-row expandable config-row-alt0 notInherited">
315 <td class="micon"><a class="exi" href="#expand"> </a></td>
318 <a id="Roo.data.Connection-cfg-timeout" name=".timeout"></a>
319 <div class="fixedFont">
320 <b class="itemname">timeout</b> : <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
326 <div class="short">(Optional) The timeout in milliseconds to be used for requests.</div>
330 <div class="long">(Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)</div>
344 <tr class="config-row expandable config-row-alt1 notInherited">
345 <td class="micon"><a class="exi" href="#expand"> </a></td>
348 <a id="Roo.data.Connection-cfg-url" name=".url"></a>
349 <div class="fixedFont">
350 <b class="itemname">url</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
356 <div class="short">(Optional) The default URL to be used for requests to the server.</div>
360 <div class="long">(Optional) The default URL to be used for requests to the server. (defaults to undefined)</div>
384 <!-- ============================== public properties ==================== -->
388 <a id="Roo.data.Connection-props"></a>
394 <table cellspacing="0" class="member-table">
395 <caption class="Empty">Public Properties - Has None</caption>
401 <!-- ============================== methods summary / details ======================== -->
404 <a id="Roo.data.Connection-methods"></a>
405 <!-- constructor?? -->
412 <!-- then dynamics first -->
419 <table cellspacing="0" class="member-table">
420 <caption>Public Methods</caption>
422 <th class="sig-header" colspan="2">Method</th>
423 <th class="msource-header">Defined By</th>
433 <tr class="method-row config-row-alt0 expandable notInherited">
434 <td class="micon"><a class="exi" href="#expand"> </a></td>
438 <a id="Roo.data-method-Connection" name=".Connection"></a>
439 <div class="fixedFont">
440 <span class="attributes">new <B>Roo.data.</B></span><b class="itemname">Connection</b>
442 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
450 <div class="short">Create a new Roo.data.Connection</div>
457 Create a new Roo.data.Connection
460 <dl class="detailList">
461 <dt class="heading">Parameters:</dt>
464 <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>
467 <dd>a configuration object.</dd>
491 <tr class="method-row config-row-alt1 expandable notInherited">
492 <td class="micon"><a class="exi" href="#expand"> </a></td>
496 <a id="Roo.data.Connection-method-abort" name=".abort"></a>
497 <div class="fixedFont">
498 <span class="attributes"></span><b class="itemname">abort</b>
500 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>transactionId</i></B>)
507 <div class="short">Aborts any outstanding request.</div>
513 Aborts any outstanding request.
520 <dl class="detailList">
521 <dt class="heading">Parameters:</dt>
524 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>transactionId</b>
527 <dd>(Optional) defaults to the last transaction</dd>
553 <tr class="method-row config-row-alt0 expandable">
554 <td class="micon"><a class="exi" href="#expand"> </a></td>
558 <a id="Roo.util.Observable-method-addEvents" name=".addEvents"></a>
559 <div class="fixedFont">
560 <span class="attributes"></span><b class="itemname">addEvents</b>
562 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>object</i></B>)
569 <div class="short">Used to define events on this Observable</div>
575 Used to define events on this Observable
582 <dl class="detailList">
583 <dt class="heading">Parameters:</dt>
586 <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>
589 <dd>The object with the events defined</dd>
609 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
615 <tr class="method-row config-row-alt1 expandable">
616 <td class="micon"><a class="exi" href="#expand"> </a></td>
620 <a id="Roo.util.Observable-method-addListener" name=".addListener"></a>
621 <div class="fixedFont">
622 <span class="attributes"></span><b class="itemname">addListener</b>
624 (<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>)
631 <div class="short">Appends an event handler to this component</div>
637 Appends an event handler to this component
644 <dl class="detailList">
645 <dt class="heading">Parameters:</dt>
648 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
651 <dd>The type of event to listen for</dd>
654 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
657 <dd>The method the event invokes</dd>
660 <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>
663 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
666 <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>
669 <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>
689 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
695 <tr class="method-row config-row-alt0 expandable">
696 <td class="micon"><a class="exi" href="#expand"> </a></td>
700 <a id="Roo.util.Observable-method-fireEvent" name=".fireEvent"></a>
701 <div class="fixedFont">
702 <span class="attributes"></span><b class="itemname">fireEvent</b>
704 (<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>)
710 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
719 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
725 Fires the specified event with the passed parameters (minus the event name).
732 <dl class="detailList">
733 <dt class="heading">Parameters:</dt>
736 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
742 <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>
745 <dd>Variable number of parameters are passed to handlers</dd>
753 <dl class="detailList">
754 <dt class="heading">Returns:</dt>
756 <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>
772 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
778 <tr class="method-row config-row-alt1 expandable">
779 <td class="micon"><a class="exi" href="#expand"> </a></td>
783 <a id="Roo.util.Observable-method-hasListener" name=".hasListener"></a>
784 <div class="fixedFont">
785 <span class="attributes"></span><b class="itemname">hasListener</b>
787 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>)
793 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
802 <div class="short">Checks to see if this object has any listeners for a specified event</div>
808 Checks to see if this object has any listeners for a specified event
815 <dl class="detailList">
816 <dt class="heading">Parameters:</dt>
819 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
822 <dd>The name of the event to check for</dd>
830 <dl class="detailList">
831 <dt class="heading">Returns:</dt>
833 <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>
849 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
855 <tr class="method-row config-row-alt0 expandable notInherited">
856 <td class="micon"><a class="exi" href="#expand"> </a></td>
860 <a id="Roo.data.Connection-method-isLoading" name=".isLoading"></a>
861 <div class="fixedFont">
862 <span class="attributes"></span><b class="itemname">isLoading</b>
864 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>transactionId</i></B>)
870 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
879 <div class="short">Determine whether this object has a request outstanding.</div>
885 Determine whether this object has a request outstanding.
892 <dl class="detailList">
893 <dt class="heading">Parameters:</dt>
896 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>transactionId</b>
899 <dd>(Optional) defaults to the last transaction</dd>
907 <dl class="detailList">
908 <dt class="heading">Returns:</dt>
910 <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>
932 <tr class="method-row config-row-alt1 expandable">
933 <td class="micon"><a class="exi" href="#expand"> </a></td>
937 <a id="Roo.util.Observable-method-on" name=".on"></a>
938 <div class="fixedFont">
939 <span class="attributes"></span><b class="itemname">on</b>
941 (<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>)
948 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
954 Appends an event handler to this element (shorthand for addListener)
961 <dl class="detailList">
962 <dt class="heading">Parameters:</dt>
965 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
968 <dd>The type of event to listen for</dd>
971 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
974 <dd>The method the event invokes</dd>
977 <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>
980 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
983 <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>
1004 <td class="msource">
1006 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1012 <tr class="method-row config-row-alt0 expandable">
1013 <td class="micon"><a class="exi" href="#expand"> </a></td>
1017 <a id="Roo.util.Observable-method-purgeListeners" name=".purgeListeners"></a>
1018 <div class="fixedFont">
1019 <span class="attributes"></span><b class="itemname">purgeListeners</b>
1028 <div class="short">Removes all listeners for this object</div>
1034 Removes all listeners for this object
1055 <td class="msource">
1057 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1063 <tr class="method-row config-row-alt1 expandable">
1064 <td class="micon"><a class="exi" href="#expand"> </a></td>
1068 <a id="Roo.util.Observable-method-removeListener" name=".removeListener"></a>
1069 <div class="fixedFont">
1070 <span class="attributes"></span><b class="itemname">removeListener</b>
1072 (<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>)
1079 <div class="short">Removes a listener</div>
1092 <dl class="detailList">
1093 <dt class="heading">Parameters:</dt>
1096 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1099 <dd>The type of event to listen for</dd>
1102 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1105 <dd>The handler to remove</dd>
1108 <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>
1111 <dd>(optional) The scope (this object) for the handler</dd>
1129 <td class="msource">
1131 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1137 <tr class="method-row config-row-alt0 expandable notInherited">
1138 <td class="micon"><a class="exi" href="#expand"> </a></td>
1142 <a id="Roo.data.Connection-method-request" name=".request"></a>
1143 <div class="fixedFont">
1144 <span class="attributes"></span><b class="itemname">request</b>
1146 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
1152 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1161 <div class="short">Sends an HTTP request to a remote server.</div>
1167 Sends an HTTP request to a remote server.
1174 <dl class="detailList">
1175 <dt class="heading">Parameters:</dt>
1178 <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>
1181 <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>
1189 <dl class="detailList">
1190 <dt class="heading">Returns:</dt>
1192 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> transactionId</dd>
1206 <td class="msource">
1214 <tr class="method-row config-row-alt1 expandable">
1215 <td class="micon"><a class="exi" href="#expand"> </a></td>
1219 <a id="Roo.util.Observable-method-un" name=".un"></a>
1220 <div class="fixedFont">
1221 <span class="attributes"></span><b class="itemname">un</b>
1223 (<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>)
1230 <div class="short">Removes a listener (shorthand for removeListener)</div>
1236 Removes a listener (shorthand for removeListener)
1243 <dl class="detailList">
1244 <dt class="heading">Parameters:</dt>
1247 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1250 <dd>The type of event to listen for</dd>
1253 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1256 <dd>The handler to remove</dd>
1259 <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>
1262 <dd>(optional) The scope (this object) for the handler</dd>
1280 <td class="msource">
1282 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1291 <!-- ============================== events summary / details ======================== -->
1294 <a id="Roo.data.Connection-events"></a>
1303 <table cellspacing="0" class="member-table">
1304 <caption>Events</caption>
1307 <th class="sig-header" colspan="2">Event</th>
1308 <th class="msource-header">Defined By</th>
1317 <tr class="method-row expandable config-row-alt0 notInherited">
1318 <td class="micon"><a class="exi" href="#expand"> </a></td>
1321 <a id="Roo.data.Connection-event-*beforerequest"></a>
1323 <div class="fixedFont">
1324 <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>)
1330 <div class="short">Fires before a network request is made to retrieve a data object.
1336 Fires before a network request is made to retrieve a data object.
1342 <dl class="detailList">
1343 <dt class="heading">Parameters:</dt>
1346 <span class="fixedFont">Connection</span> <b>conn</b>
1349 <dd>This Connection object.</dd>
1352 <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>
1355 <dd>The options config object passed to the {<b>link</b> <b>request</b>} method.</dd>
1373 <td class="msource">
1378 <tr class="method-row expandable config-row-alt1 notInherited">
1379 <td class="micon"><a class="exi" href="#expand"> </a></td>
1382 <a id="Roo.data.Connection-event-*requestcomplete"></a>
1384 <div class="fixedFont">
1385 <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>)
1391 <div class="short">Fires if the request was successfully completed.
1397 Fires if the request was successfully completed.
1403 <dl class="detailList">
1404 <dt class="heading">Parameters:</dt>
1407 <span class="fixedFont">Connection</span> <b>conn</b>
1410 <dd>This Connection object.</dd>
1413 <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>
1416 <dd>The XHR object containing the response data.<br/>See {<b>link</b> http://www.w3.org/TR/XMLHttpRequest/} for details.</dd>
1419 <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>
1422 <dd>The options config object passed to the {<b>link</b> <b>request</b>} method.</dd>
1440 <td class="msource">
1445 <tr class="method-row expandable config-row-alt0 notInherited">
1446 <td class="micon"><a class="exi" href="#expand"> </a></td>
1449 <a id="Roo.data.Connection-event-*requestexception"></a>
1451 <div class="fixedFont">
1452 <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>)
1458 <div class="short">Fires if an error HTTP status was returned from the server.
1464 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.
1470 <dl class="detailList">
1471 <dt class="heading">Parameters:</dt>
1474 <span class="fixedFont">Connection</span> <b>conn</b>
1477 <dd>This Connection object.</dd>
1480 <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>
1483 <dd>The XHR object containing the response data.<br/>See {<b>link</b> http://www.w3.org/TR/XMLHttpRequest/} for details.</dd>
1486 <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>
1489 <dd>The options config object passed to the {<b>link</b> <b>request</b>} method.</dd>
1507 <td class="msource">
1519 <!-- ============================== footer ================================= -->
1520 <div class="fineprint" style="clear:both">
1522 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Wed Nov 10 2010 14:52:47 GMT+0800 (HKT)
1524 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>