| listeners : ObjectA config object containing one or more event handlers to be added to this
+}); Config Options|
| listeners : ObjectA config object containing one or more event handlers to be added to this
object during initialization. This should ... A config object containing one or more event handlers to be added to this
object during initialization. This should be a valid listeners config object as specified in the
addListener example for attaching multiple handlers at once.
@@ -80,23 +80,23 @@ Ext.DomObserver = Ext.extend(Object, {
typeAhead: true,
mode: 'local',
triggerAction: 'all'
-}); | Observable |
Public Properties|
| defaultUrl : String Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true. | Updater | | disableCaching : BooleanWhether to append unique parameter on get request to disable caching (defaults to Ext.Updater.defaults.disableCaching... | Updater | | el : Ext.Element The Element object | Updater | | formUpdateDelegate : FunctionDelegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arg... Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments | Updater | | indicatorText : String | Updater | | loadScripts : Boolean | Updater | | refreshDelegate : Function Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments | Updater | | renderer : Object | Updater | | showLoadIndicator : String | Updater | | sslBlankUrl : String | Updater | | timeout : Number | Updater | | transaction : Object Transaction object of the current executing transaction, or null if there is no active transaction. | Updater | | updateDelegate : Function Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments | Updater |
Public MethodsPublic Properties|
| defaultUrl : String Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true. | Updater | | disableCaching : BooleanWhether to append unique parameter on get request to disable caching (defaults to Ext.Updater.defaults.disableCaching... | Updater | | el : Ext.Element The Element object | Updater | | formUpdateDelegate : FunctionDelegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arg... Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments | Updater | | indicatorText : String | Updater | | loadScripts : Boolean | Updater | | refreshDelegate : Function Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments | Updater | | renderer : Object | Updater | | showLoadIndicator : String | Updater | | sslBlankUrl : String | Updater | | timeout : Number | Updater | | transaction : Object Transaction object of the current executing transaction, or null if there is no active transaction. | Updater | | updateDelegate : Function Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments | Updater |
Public Methods|
| Updater( Mixed el , [Boolean forceNew ] )
Create new Updater directly. Create new Updater directly. | Updater | | Updater.updateElement( Mixed el , String url , [String/Object params ], [Object options ] )
- :
- void<static> Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
-Usage:
+has an Updater and if it does it returns the same instance. This will skip that check (useful for extending this class). Returns: | Updater | | Updater.updateElement( Mixed el , String url , [String/Object params ], [Object options ] )
+ :
+ void<static> Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
+Usage:
Ext.Updater.up... <static> Static convenience method. This method is deprecated in favor of el.load({url:'foo.php', ...}).
Usage:
Ext.Updater.updateElement("my-div", "stuff.php");
Parameters:el : MixedThe element to update url : StringThe url params : String/Object(optional) Url encoded param string or an object of name/value pairs options : Object(optional) A config object with any of the Updater properties you want to set - for
-example: {disableCaching:true, indicatorText: "Loading data..."} Returns: | Updater | | abort()
- :
- voidAborts the currently executing transaction, if any. Aborts the currently executing transaction, if any. | Updater | | addEvents( Object|String o , string Optional. )
- :
+example: {disableCaching:true, indicatorText: "Loading data..."}Returns: | Updater | | abort()
+ :
+ voidAborts the currently executing transaction, if any. Aborts the currently executing transaction, if any. | Updater | | addEvents( Object|String o , string Optional. )
+ :
voidAdds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
- :
+Usage:this.addEvents('storeloaded', 'storecleared'); Returns: | Observable | | addListener( String eventName , Function handler , [Object scope ], [Object options ] )
+ :
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:eventName : StringThe name of the event to listen for. handler : FunctionThe method the event invokes. scope : Object(optional) The scope (this reference) in which the handler function is executed.
If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration.
properties. This may contain any of the following properties:
@@ -146,56 +146,56 @@ Or a shorthand syntax:
'mouseover' : this.onMouseOver,
'mouseout' : this.onMouseOut,
scope: this
-}); Returns: | Observable | | enableBubble( Object events )
- :
- voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
-this.getBubbleTarget() if present... Enables events fired by this Observable to bubble up an owner hierarchy by calling
-this.getBubbleTarget() if present. There is no implementation in the Observable base class.
- This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
-implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
-access the required target more quickly.
- Example: Ext.override(Ext.form.Field, {
-// Add functionality to Field's initComponent to enable the change event to bubble
- initComponent: Ext.form.Field.prototype.initComponent.createSequence(function() {
- this.enableBubble('change');
- }),
-
-// We know that we want Field's events to bubble directly to the FormPanel.
- getBubbleTarget: function() {
- if (!this.formPanel) {
- this.formPanel = this.findParentByType('form');
- }
- return this.formPanel;
- }
-});
-
-var myForm = new Ext.formPanel({
- title: 'User Details',
- items: [{
- ...
- }],
- listeners: {
- change: function() {
-// Title goes red if form has been modified.
- myForm.header.setStyle("color", "red");
- }
- }
-});
| Observable | | fireEvent( String eventName , Object... args )
- :
- BooleanFires the specified event with the passed parameters (minus the event name).
+}); Returns: | Observable | | enableBubble( String/Array events )
+ :
+ voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
+this.getBubbleTarget() if present. There is no implementation in the Observable base class.
+ This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default
+implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to
+access the required target more quickly.
+ Example: Ext.override(Ext.form.Field, {
+ // Add functionality to Field's initComponent to enable the change event to bubble
+ initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
+ this.enableBubble('change');
+ }),
+
+ // We know that we want Field's events to bubble directly to the FormPanel.
+ getBubbleTarget : function() {
+ if (!this.formPanel) {
+ this.formPanel = this.findParentByType('form');
+ }
+ return this.formPanel;
+ }
+});
+
+var myForm = new Ext.formPanel({
+ title: 'User Details',
+ items: [{
+ ...
+ }],
+ listeners: {
+ change: function() {
+ // Title goes red if form has been modified.
+ myForm.header.setStyle('color', 'red');
+ }
+ }
+});
| Observable | | fireEvent( String eventName , Object... args )
+ :
+ BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... | Observable | | formUpdate( String/HTMLElement form , [String url ], [Boolean reset ], [Function callback ] )
- :
- voidPerforms an async form post, updating this element with the response. If the form has the attribute
-enctype="<a href=... Performs an async form post, updating this element with the response. If the form has the attribute
+by calling enableBubble. | Observable | | formUpdate( String/HTMLElement form , [String url ], [Boolean reset ], [Function callback ] )
+ :
+ voidPerforms an asynchronous form post, updating this element with the response. If the form has the attribute
+enctype="<... Performs an asynchronous 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.
File uploads are not performed using normal "Ajax" techniques, that is they are not
performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the
-DOM <form> element temporarily modified to have its
+DOM <form> element temporarily modified to have its
target set to refer
-to a dynamically generated, hidden <iframe> which is inserted into the document
+to a dynamically generated, hidden <iframe> which is inserted into the document
but removed after the return data has been gathered.
Be aware that file upload packets, sent with the content type multipart/form-data
and some server technologies (notably JEE) may require some custom processing in order to
@@ -203,76 +203,76 @@ retrieve parameter names and parameter values from the packet content.
el : Ext.ElementThe Element being updated.
success : BooleanTrue for success, false for failure.
- response : XMLHttpRequestThe XMLHttpRequest which processed the update. Returns: | Updater | | getDefaultRenderer()
- :
- voidThis is an overrideable method which returns a reference to a default
+ response : XMLHttpRequestThe XMLHttpRequest which processed the update. Returns: | Updater | | getDefaultRenderer()
+ :
+ voidThis is an overrideable method which returns a reference to a default
renderer class if none is specified when creati... This is an overrideable method which returns a reference to a default
renderer class if none is specified when creating the Ext.Updater.
-Defaults to Ext.Updater.BasicRenderer | Updater | | getEl()
- :
- Ext.ElementGet the Element this Updater is bound to Get the Element this Updater is bound to | Updater | | getRenderer()
- :
- ObjectReturns the current content renderer for this Updater. See Ext.Updater.BasicRenderer.render for more details. | Updater | | hasListener( String eventName )
- :
- BooleanChecks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event | Observable | | isAutoRefreshing()
- :
- voidReturns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false. Returns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false. | Updater | | isUpdating()
- :
- BooleanReturns true if an update is in progress, otherwise false. Returns true if an update is in progress, otherwise false. | Updater | | on( String eventName , Function handler , [Object scope ], [Object options ] )
- :
+Defaults to Ext.Updater.BasicRenderer | Updater | | getEl()
+ :
+ Ext.ElementGet the Element this Updater is bound to Get the Element this Updater is bound to | Updater | | getRenderer()
+ :
+ ObjectReturns the current content renderer for this Updater. See Ext.Updater.BasicRenderer.render for more details. | Updater | | hasListener( String eventName )
+ :
+ BooleanChecks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event | Observable | | isAutoRefreshing()
+ :
+ voidReturns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false. Returns true if the Updater is currently set to auto refresh its content (see startAutoRefresh), otherwise false. | Updater | | isUpdating()
+ :
+ BooleanReturns true if an update is in progress, otherwise false. Returns true if an update is in progress, otherwise false. | Updater | | on( String eventName , Function handler , [Object scope ], [Object options ] )
+ :
voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:eventName : StringThe type of event to listen for handler : FunctionThe method the event invokes scope : Object(optional) The scope (this reference) in which the handler function is executed.
-If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration. Returns: | Observable | | purgeListeners()
- :
- voidRemoves all listeners for this object Removes all listeners for this object | Observable | | refresh( [Function callback ] )
- :
- voidRefresh the element with the last used url or defaultUrl. If there is no url, it returns immediately Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately | Updater | | relayEvents( Object o , Array events )
- :
- voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. | Observable | | removeListener( String eventName , Function handler , [Object scope ] )
- :
- voidRemoves an event handler. Removes an event handler. | Observable | | resumeEvents()
- :
- voidResume firing events. (see suspendEvents)
-If events were suspended using the queueSuspended parameter, then all
+If omitted, defaults to the object which fired the event. options : Object(optional) An object containing handler configuration. Returns: | Observable | | purgeListeners()
+ :
+ voidRemoves all listeners for this object Removes all listeners for this object | Observable | | refresh( [Function callback ] )
+ :
+ voidRefresh the element with the last used url or defaultUrl. If there is no url, it returns immediately Refresh the element with the last used url or defaultUrl. If there is no url, it returns immediately | Updater | | relayEvents( Object o , Array events )
+ :
+ voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. | Observable | | removeListener( String eventName , Function handler , [Object scope ] )
+ :
+ voidRemoves an event handler. Removes an event handler. | Observable | | resumeEvents()
+ :
+ voidResume firing events. (see suspendEvents)
+If events were suspended using the queueSuspended parameter, then all
event... Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
-events fired during event suspension will be sent to any listeners now. | Observable | | setDefaultUrl( String/Function defaultUrl )
- :
- voidSets the default URL used for updates. Sets the default URL used for updates. | Updater | | setRenderer( Object renderer )
- :
- voidSets the content renderer for this Updater. See Ext.Updater.BasicRenderer.render for more details. | Updater | | showLoading()
- :
- voidDisplay the element's "loading" state. By default, the element is updated with indicatorText. This
+events fired during event suspension will be sent to any listeners now. | Observable | | setDefaultUrl( String/Function defaultUrl )
+ :
+ voidSets the default URL used for updates. Sets the default URL used for updates. | Updater | | setRenderer( Object renderer )
+ :
+ voidSets the content renderer for this Updater. See Ext.Updater.BasicRenderer.render for more details. | Updater | | showLoading()
+ :
+ voidDisplay the element's "loading" state. By default, the element is updated with indicatorText. This
method may be over... Display the element's "loading" state. By default, the element is updated with indicatorText. This
-method may be overridden to perform a custom action while this Updater is actively updating its contents. | Updater | | startAutoRefresh( Number interval , [String/Object/Function url ], [String/Object params ], [Function callback ], [Boolean refreshNow ] )
- :
+method may be overridden to perform a custom action while this Updater is actively updating its contents. | Updater | | startAutoRefresh( Number interval , [String/Object/Function url ], [String/Object params ], [Function callback ], [Boolean refreshNow ] )
+ :
voidSet this element to auto refresh. Can be canceled by calling stopAutoRefresh. Set this element to auto refresh. Can be canceled by calling stopAutoRefresh. Parameters:interval : NumberHow often to update (in seconds). url : String/Object/Function(optional) The url for this request, a config object in the same format
supported by load, or a function to call to get the url (defaults to the last used url). Note that while
the url used in a load call can be reused by this method, other load config options will not be reused and must be
sepcified as part of a config object passed as this paramter if needed. params : String/Object(optional) The parameters to pass as either a url encoded string
-"¶m1=1¶m2=2" or as an object {param1: 1, param2: 2} callback : Function(optional) Callback when transaction is complete - called with signature (oElement, bSuccess) refreshNow : Boolean(optional) Whether to execute the refresh now, or wait the interval Returns: | Updater | | stopAutoRefresh()
- :
- voidStop auto refresh on this element. Stop auto refresh on this element. | Updater | | suspendEvents( Boolean queueSuspended )
- :
+"¶m1=1¶m2=2" or as an object {param1: 1, param2: 2}callback : Function(optional) Callback when transaction is complete - called with signature (oElement, bSuccess) refreshNow : Boolean(optional) Whether to execute the refresh now, or wait the interval Returns: | Updater | | stopAutoRefresh()
+ :
+ voidStop auto refresh on this element. Stop auto refresh on this element. | Updater | | suspendEvents( Boolean queueSuspended )
+ :
voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:queueSuspended : BooleanPass as true to queue up suspended events to be fired
-after the resumeEvents call instead of discarding all suspended events; Returns: | Observable | | un( String eventName , Function handler , [Object scope ] )
- :
- voidRemoves an event handler (shorthand for removeListener.) | Observable | | update( Object options )
- :
- voidPerforms an asynchronous request, updating this element with the response.
+after the resumeEvents call instead of discarding all suspended events; Returns: | Observable | | un( String eventName , Function handler , [Object scope ] )
+ :
+ voidRemoves an event handler (shorthand for removeListener.) | Observable | | update( Object options )
+ :
+ voidPerforms an asynchronous request, updating this element with the response.
If params are specified it uses POST, othe... Performs an asynchronous request, updating this element with the response.
If params are specified it uses POST, otherwise it uses GET.
Note: Due to the asynchronous nature of remote server requests, the Element
will not have been fully updated when the function returns. To post-process the returned
-data, use the callback option, or an update event handler. Parameters:options : ObjectA config object containing any of the following options:
+data, use the callback option, or an update event handler.Parameters:options : ObjectA config object containing any of the following options:
- url : String/Function
The URL to request or a function which
returns the URL (defaults to the value of Ext.Ajax.url if not specified).
- method : String
The HTTP method to
-use. Defaults to POST if the params argument is present, otherwise GET.
+use. Defaults to POST if the params argument is present, otherwise GET.
- params : String/Object/Function
The
parameters to pass to the server (defaults to none). These may be specified as a url-encoded
string, or as an object containing properties which represent parameters,
or as a function, which returns such an object.
-- scripts : Boolean
If true
+ - scripts : Boolean
If true
any <script> tags embedded in the response text will be extracted
and executed (defaults to Ext.Updater.defaults.loadScripts). If this option is specified,
the callback will be called after the execution of the scripts.
@@ -285,11 +285,11 @@ parameters are passed:
- scope : Object
The scope in which
-to execute the callback (The callback's this reference.) If the
-params argument is a function, this scope is used for that function also.
+to execute the callback (The callback's this reference.) If the
+params argument is a function, this scope is used for that function also.
- discardUrl : Boolean
By default, the URL of this request becomes
the default URL for this Updater object, and will be subsequently used in refresh
-calls. To bypass this behavior, pass discardUrl:true (defaults to false).
+calls. To bypass this behavior, pass discardUrl:true (defaults to false).
- timeout : Number
The number of seconds to wait for a response before
timing out (defaults to Ext.Updater.defaults.timeout).
- text : String
The text to use as the innerHTML of the
@@ -300,20 +300,20 @@ requests, this option causes an extra, auto-generated parameter to be appended t
to defeat caching (defaults to Ext.Updater.defaults.disableCaching).
For example:
- um.update({
- url: "your-url.php",
- params: {param1: "foo", param2: "bar"}, // or a URL encoded string
- callback: yourFunction,
- scope: yourObject, //(optional scope)
- discardUrl: true,
- nocache: true,
- text: "Loading...",
- timeout: 60,
- scripts: false // Save time by avoiding RegExp execution.
- });
Returns:
| Updater |
Public Events|
| beforeupdate :
- ( Ext.Element el , String/Object/Function url , String/Object params )
- 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. Listeners will be called with the following arguments:el : Ext.Elementurl : String/Object/Functionparams : String/Object
| Updater | | failure :
- ( Ext.Element el , Object oResponseObject )
- Fired on update failure. Fired on update failure. Listeners will be called with the following arguments:el : Ext.ElementoResponseObject : ObjectThe response Object
| Updater | | update :
- ( Ext.Element el , Object oResponseObject )
+ um.update({
+ url: "your-url.php",
+ params: {param1: "foo", param2: "bar"}, // or a URL encoded string
+ callback: yourFunction,
+ scope: yourObject, //(optional scope)
+ discardUrl: true,
+ nocache: true,
+ text: "Loading...",
+ timeout: 60,
+ scripts: false // Save time by avoiding RegExp execution.
+ }); Returns: | Updater |
Public Events|
| beforeupdate :
+ ( Ext.Element el , String/Object/Function url , String/Object params )
+ 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. Listeners will be called with the following arguments:el : Ext.Elementurl : String/Object/Functionparams : String/Object
| Updater | | failure :
+ ( Ext.Element el , Object oResponseObject )
+ Fired on update failure. Fired on update failure. Listeners will be called with the following arguments:el : Ext.ElementoResponseObject : ObjectThe response Object
| Updater | | update :
+ ( Ext.Element el , Object oResponseObject )
Fired after successful update is made. Fired after successful update is made. Listeners will be called with the following arguments:el : Ext.ElementoResponseObject : ObjectThe response Object
| Updater |
\ No newline at end of file
|