| Defined In: | UpdateManager.js |
| Class: | Ext.Updater.BasicRenderer |
| Extends: | Object |
| 属性 | 定义者 | |
|---|---|---|
|
el: this.
元素对象
元素对象
|
Updater | |
|
defaultUrl: this.
用于刷新的缓存url,如参数设置为false,每次调用update...
用于刷新的缓存url,如参数设置为false,每次调用update()都会重写该值。
|
Updater | |
|
sslBlankUrl:
空白页的URL,通过SSL链接上传文件时使用(默认为“javasc...
空白页的URL,通过SSL链接上传文件时使用(默认为“javascript:false”)。
|
defaults | |
|
disableCaching:
是否添加一个唯一的参数以使接到请求时禁止缓存(默认为 false)。
是否添加一个唯一的参数以使接到请求时禁止缓存(默认为 false)。
|
defaults | |
|
indicatorText:
加载指示器显示的内容(默认为'<div class="loa...
加载指示器显示的内容(默认为'<div class="loading-indicator">Loading...</div>')
|
defaults | |
|
showLoadIndicator:
加载时是否显示“indicatorText”(默认为 true)。
加载时是否显示“indicatorText”(默认为 true)。
|
defaults | |
|
timeout:
以秒为单位的请求超时时限(默认为30秒)。
以秒为单位的请求超时时限(默认为30秒)。
|
defaults | |
|
loadScripts:
True表示为执行脚本(默认为false)。
True表示为执行脚本(默认为false)。
|
defaults | |
|
refreshDelegate: this.
Delegate for refresh() prebound t...
Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments
|
Updater | |
|
updateDelegate: this.
Delegate for update() prebound to...
Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments
|
Updater | |
|
formUpdateDelegate: this.
Delegate for formUpdate() preboun...
Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments
|
Updater | |
| 方法 | 定义者 | |
|---|---|---|
Updater
(
Mixed el,
[Boolean forceNew]
)
: Ext.Updater
构造器
构造器
参数项:
|
Updater | |
|
transaction
(
)
Transaction object of current exe...
Transaction object of current executing transaction
参数项:
|
Updater | |
|
renderer
(
)
The renderer for this Updater. De...
The renderer for this Updater. Defaults to Ext.Updater.BasicRenderer.
参数项:
|
Updater | |
|
getEl
(
)
: Ext.Element
获取当前UpdateManager所绑定的元素
获取当前UpdateManager所绑定的元素
参数项:
|
Updater | |
NB
(
[Object/String/Function url],
[String/Object params],
[Function callback],
[Boolean discardUrl]
)
发起一个的异步请求,然后根据响应的response更新元素。
如...
发起一个的异步请求,然后根据响应的response更新元素。
如不指定使用GET,否则POST。
只有url的属性是必须的。
可选属性有nocache, text and scripts,分别是disableCaching,indicatorText和loadScripts的简写方式
它们用于设置UpdateManager实例相关的属性。
该参数为true的话,就不会保存。
参数项:
|
Updater | |
update
(
[Object options]
)
发起一个的异步请求,然后根据响应的response更新元素。
如...
发起一个的异步请求,然后根据响应的response更新元素。
如不指定使用GET,否则POST。
NB: 根据异步请求远端服务器的特性,此函数执行后元素不会立即被更新。要处理返回的数据,使用回调选项,或指定update事件句柄 The URL to request or a function which returns the URL. The HTTP method to use. Defaults to POST if params are present, or GET if not. The parameters to pass to the server. 传到服务器的参数。这可以字符串(未urlencoded亦可),或代表参数的对象,或返回对象的函数。 If true any <script> tags embedded in the response text will be extracted and executed. If this option is specified, the callback will be called after the execution of the scripts. 接收到服务器的响应后,执行的回调函数。该函数带下列的参数:
The scope in which to execute the callback 回调函数所在的作用域(this所指向的引用)。如果 params 选项是一个函数,那么这个作用域也用于该函数。 If not passed as false the URL of this request becomes the default URL for this Updater object, and will be subsequently used in #refresh calls.(可选的) 默认情况下,完成更新后,最后一次使用的url会保存到defaultUrl属性 该参数为true的话,就不会保存。 The timeout to use when waiting for a response. Only needed for GET requests, this option causes an extra, generated parameter to be passed to defeat caching. For example:
参数项:
|
Updater | |
formUpdate
(
String/HTMLElement form,
[String url],
[Boolean reset],
[Function callback]
)
执行表单的异步请求,然后根据响应response更新元素。
表单...
执行表单的异步请求,然后根据响应response更新元素。
表单若有enctype="multipart/form-data"的属性,即被认为是文件上传。
SSL文件上传应使用this.sslBlankUrl以阻止IE的安全警告。
参数项:
|
Updater | |
refresh
(
[Function callback]
)
根据最后一次使用的url,或属性defaultUrl,刷新元素。
...
根据最后一次使用的url,或属性defaultUrl,刷新元素。
如果未发现url,则立即返回。
参数项:
|
Updater | |
startAutoRefresh
(
Number interval,
[String/Function url],
[String/Object params],
[Function callback],
[Boolean refreshNow]
)
设置该元素自动刷新。
设置该元素自动刷新。
参数项:
|
Updater | |
|
stopAutoRefresh
(
)
停止该元素的自动刷新
停止该元素的自动刷新
参数项:
|
Updater | |
|
showLoading
(
)
把元素换成“加载中”的状态,可重写该方法执行自定义的动作。
把元素换成“加载中”的状态,可重写该方法执行自定义的动作。
参数项:
|
Updater | |
setRenderer
(
Object renderer
)
为这次更新设置内容渲染器。参阅Ext.Updater.BasicR...
为这次更新设置内容渲染器。参阅Ext.Updater.BasicRenderer#render的更多资料。
参数项:
|
Updater | |
setDefaultUrl
(
String/Function defaultUrl
)
为这次更新设置defaultUrl
为这次更新设置defaultUrl
参数项:
|
Updater | |
|
abort
(
)
取消执行事务
取消执行事务
参数项:
|
Updater | |
|
isUpdating
(
)
: Boolean
当更新进行时返回true。
当更新进行时返回true。
参数项:
|
Updater | |
updateElement
(
Mixed el,
String url,
String/Object params,
Object options
)
静态的快捷方法。这个方法已经是过时的,推荐使用el.load({u...
静态的快捷方法。这个方法已经是过时的,推荐使用el.load({url:'foo.php', ...})。
Usage:
@deprecated
@member Ext.Updater
参数项:
|
defaults | |
render
(
Ext.Element el,
Object response,
Updater updateManager,
Function callback
)
当事务完成并准备更新元素的时候调用此方法。
BasicRende...
当事务完成并准备更新元素的时候调用此方法。
BasicRenderer 使用 responseText 更新元素的 innerHTML 属性。
如想要指定一个定制的渲染器(如:XML 或 JSON),使用“render(el, response)”方法创建一个对象,
并通过setRenderer方法传递给UpdateManager。
参数项:
|
BasicRenderer | |
| 事件 | 定义者 | |
|---|---|---|
beforeupdate
(
Ext.Element el,
String/Object/Function url,
String/Object params
)
在一个更新开始之前触发,如在事件句柄中返回false即意味着取消...
在一个更新开始之前触发,如在事件句柄中返回false即意味着取消这次更新。
参数项:
|
Updater | |
update
(
Ext.Element el,
Object oResponseObject
)
当更新成功后触发
当更新成功后触发
参数项:
|
Updater | |
failure
(
Ext.Element el,
Object oResponseObject
)
当更新失败后触发
当更新失败后触发
参数项:
|
Updater | |