Roo.util.Observable Roo.UpdateManager
Package: | Roo |
Defined In: | Roo/UpdateManager.js. |
Class: | UpdateManager |
Extends: | Roo.util.Observable |
// Get it from a Roo.Element object
var el = Roo.get("foo");
var mgr = el.getUpdateManager();
mgr.update("http://myserver.com/index.php", "param1=1¶m2=2");
...
mgr.formUpdate("myFormId", "http://myserver.com/index.php");
// or directly (returns the same UpdateManager instance)
var mgr = new Roo.UpdateManager("myElementId");
mgr.startAutoRefresh(60, "http://myserver.com/index.php");
mgr.on("update", myFcnNeedsToKnow);
// short handed call directly from the element object
Roo.get("foo").load({
url: "bar.php",
scripts:true,
params: "for=bar",
text: "Loading Foo..."
});
Options | Defined By | |
---|---|---|
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 | Defined By | |
---|---|---|
Create a new Roo.UpdateManager
Create a new Roo.UpdateManager
|
||
Roo.UpdateManager.updateElement
(String/HTMLElement/Roo.Element el, String url, String/Object params, Object options)
Static convenience method.
Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
Usage:
|
Roo.UpdateManager | |
abort
()
Aborts the executing transaction
Aborts the executing transaction
|
Roo.UpdateManager | |
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 | |
Performs an async form post, updating this element with the response.
Performs an async form post, updating this element with the response. If the form has the attribute enctype="multipart/form-data", it assumes it's a file upload.
Uses this.sslBlankUrl for SSL file uploads to prevent IE security warning.
|
Roo.UpdateManager | |
getEl
()
:
Roo.Element
Get the Element this UpdateManager is bound to
Get the Element this UpdateManager is bound to
|
Roo.UpdateManager | |
Roo.util.Observable | ||
isUpdating
()
:
Boolean
Returns true if an update is in progress
Returns true if an update is in progress
|
Roo.UpdateManager | |
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 | |
refresh
(Function callback)
Refresh the element with the last used url or defaultUrl.
Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately
|
Roo.UpdateManager | |
Roo.util.Observable | ||
setDefaultUrl
(String/Function defaultUrl)
Set the defaultUrl used for updates
Set the defaultUrl used for updates
|
Roo.UpdateManager | |
setRenderer
(Object renderer)
Set the content renderer for this UpdateManager.
Set the content renderer for this UpdateManager. See {link Roo.UpdateManager.BasicRendererrender} for more details.
|
Roo.UpdateManager | |
showLoading
()
Called to update the element to "Loading" state.
Called to update the element to "Loading" state. Override to perform custom action.
|
Roo.UpdateManager | |
startAutoRefresh
(Number interval, String/Function url, String/Object params, Function callback, Boolean refreshNow)
Set this element to auto refresh.
Set this element to auto refresh.
|
Roo.UpdateManager | |
stopAutoRefresh
()
Stop auto refresh on this element.
Stop auto refresh on this element.
|
Roo.UpdateManager | |
Roo.util.Observable | ||
Performs an async request, updating this element with the response.
Performs an async request, updating this element with the response. If params are specified it uses POST, otherwise it uses GET.
|
Roo.UpdateManager |
Event | Defined By | |
---|---|---|
Fired before an update is made, return false from your handler and the update is cancelled.
Fired before an update is made, return false from your handler and the update is cancelled.
|
Roo.UpdateManager | |
failure (Roo.Element el, Object oResponseObject)
Fired on update failure.
Fired on update failure.
|
Roo.UpdateManager | |
update (Roo.Element el, Object oResponseObject)
Fired after successful update is made.
Fired after successful update is made.
|
Roo.UpdateManager |