|
| 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,48 +147,48 @@ Or a shorthand syntax:
'mouseover' : this.onMouseOver,
'mouseout' : this.onMouseOut,
scope: this
-}); 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).
+}); 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 asynchronous 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.
@@ -203,62 +204,62 @@ 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
@@ -300,20 +301,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 |