Roo.util.Observable Roo.data.Connection
Package: | Roo.data |
Defined In: | Roo/data/Connection.js. |
Class: | Connection |
Subclasses: | Roo.Ajax |
Extends: | Roo.util.Observable |
Requests made by this class are asynchronous, and will return immediately. No data from
the server will be available to the statement immediately following the {link request} call.
To process returned data, use a callback in the request options object, or an event listener.
Note: If you are doing a file upload, you will not get a normal response object sent back to
your callback or event handler. Since the upload is handled via in IFRAME, there is no XMLHttpRequest.
The response object is created using the innerHTML of the IFRAME's document as the responseText
property and, if present, the IFRAME's XML document as the responseXML property.
Options | Defined By | |
---|---|---|
autoAbort : Boolean
(Optional) Whether this request should abort any pending requests.
(Optional) Whether this request should abort any pending requests. (defaults to false)
|
Roo.data.Connection | |
defaultHeaders : Object
(Optional) An object containing request headers which are added
to each request made by this object.
(Optional) An object containing request headers which are added
to each request made by this object. (defaults to undefined) |
Roo.data.Connection | |
disableCaching : Boolean
(Optional) True to add a unique cache-buster param to GET requests.
(Optional) True to add a unique cache-buster param to GET requests. (defaults to true)
|
Roo.data.Connection | |
extraParams : Object
(Optional) An object containing properties which are used as
extra parameters to each request made by this object.
(Optional) An object containing properties which are used as
extra parameters to each request made by this object. (defaults to undefined) |
Roo.data.Connection | |
listeners : Object
list of events and functions to call for this object,
For example :
list of events and functions to call for this object,
For example :
|
Roo.util.Observable | |
method : String
(Optional) The default HTTP method to be used for requests.
(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)
|
Roo.data.Connection | |
timeout : Number
(Optional) The timeout in milliseconds to be used for requests.
(Optional) The timeout in milliseconds to be used for requests. (defaults to 30000)
|
Roo.data.Connection | |
url : String
(Optional) The default URL to be used for requests to the server.
(Optional) The default URL to be used for requests to the server. (defaults to undefined)
|
Roo.data.Connection |
Method | Defined By | |
---|---|---|
new Roo.data.Connection
(Object config)
Create a new Roo.data.Connection
Create a new Roo.data.Connection
|
||
abort
(Number transactionId)
Aborts any outstanding request.
Aborts any outstanding request.
|
Roo.data.Connection | |
addEvents
(Object object)
Used to define events on this Observable
Used to define events on this Observable
|
Roo.util.Observable | |
Appends an event handler to this component
Appends an event handler to this component
|
Roo.util.Observable | |
Fires the specified event with the passed parameters (minus the event name).
|
Roo.util.Observable | |
Roo.util.Observable | ||
Roo.data.Connection | ||
Appends an event handler to this element (shorthand for addListener)
Appends an event handler to this element (shorthand for addListener)
|
Roo.util.Observable | |
purgeListeners
()
Removes all listeners for this object
Removes all listeners for this object
|
Roo.util.Observable | |
Roo.util.Observable | ||
Sends an HTTP request to a remote server.
Sends an HTTP request to a remote server.
|
Roo.data.Connection | |
Roo.util.Observable |
Event | Defined By | |
---|---|---|
beforerequest (Connection conn, Object options)
Fires before a network request is made to retrieve a data object.
Fires before a network request is made to retrieve a data object.
|
Roo.data.Connection | |
Fires if the request was successfully completed.
|
Roo.data.Connection | |
Fires if an error HTTP status was returned from the server.
Fires if an error HTTP status was returned from the server.
See {link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html} for details of HTTP status codes. |
Roo.data.Connection |