PropertiesMethodsEventsConfig OptionsDirect Link

Class Ext.data.Connection

Package: Ext.grid
Defined In: .js
Class:
Extends: Ext.util.Observable
此类封装了一个页面到当前域的连接,以响应(来自配置文件中的url或请求时指定的url)请求 通过该类产生的请求都是异步的,并且会立刻返回,紧根其后的#request调用将得不到数据 可以使用在request配置项一个回调函数,或事件临听器来处理返回来的数据。

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 #request call. To process returned data, use a callback in the request options object, or an event listener.


注意:如果你正在上传文件,你将得不到一个正常的响应对象送回到你的回调或事件名柄中,原因是上传利用iframe来处理的. 这里没有xmlhttpRequest对象。response对象是通过iframe的document的innerTHML作为responseText属性,如果存在, 该iframe的xml document作为responseXML属性 这意味着一个有效的xml或html document必须被返回,如果需要json数据,这次意味着它将放到 html document的textarea元素内(通过某种规则可以从responseText重新得到)或放到一个元数据区内(通过标准的dom方法可以重新得到) 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.


This means that a valid XML or HTML document must be returned. If JSON data is required, it is suggested that it be placed either inside a <textarea> in an HTML document and retrieved from the responseText using a regex, or inside a CDATA section in an XML document and retrieved from the responseXML using standard DOM methods.

配置项

配置项 定义者

公告属性

属性 定义者

公共方法

方法 定义者

公告事件

这个类没公共的事件。