X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/c930e9176a5a85509c5b0230e2bff5c22a591432..c8256059947f3aa8f5b0a9a2acf55e2142bb4742:/docs/output/Ext.Updater.html diff --git a/docs/output/Ext.Updater.html b/docs/output/Ext.Updater.html index 98e61f62..8984cb24 100644 --- a/docs/output/Ext.Updater.html +++ b/docs/output/Ext.Updater.html @@ -1,4 +1,4 @@ -
Properties Methods Events Config Options Direct Link
Observable
  Updater

Class Ext.Updater

Package:Ext
Defined In:UpdateManager.js
Class:Updater
Extends:Observable
Provides AJAX-style update capabilities for Element objects. Updater can be used to update +
Observable
  Updater

Class Ext.Updater

Package:Ext
Defined In:UpdateManager.js
Class:Updater
Extends:Observable
Provides AJAX-style update capabilities for Element objects. Updater can be used to update an Ext.Element once, or you can use startAutoRefresh to set up an auto-updating Element on a specific interval.

Usage:
@@ -91,9 +91,11 @@ Usage:
Ext.Updater.updateElement("my-div", "stuff.php");
Parameters:
  • el : Mixed
    The element to update
  • url : String
    The 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:
  • void
Updater abort() : - void
Aborts the currently executing transaction, if any.
Aborts the currently executing transaction, if any.
Parameters:
  • None.
Returns:
  • void
Updater addEventsObject object ) + void
Aborts the currently executing transaction, if any.
Aborts the currently executing transaction, if any.
Parameters:
  • None.
Returns:
  • void
Updater addEventsObject|String ostring Optional. ) : - void
Used to define events on this Observable
Used to define events on this Observable
Parameters:
  • object : Object
    The object with the events defined
Returns:
  • void
Observable addListenerString eventNameFunction handler[Object scope][Object options] ) + void
Adds 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.
Parameters:
  • o : Object|String
    Either an object with event names as properties with a value of true +or the first event name string if multiple event names are being passed as separate parameters.
  • Optional. : string
    Event name if multiple event names are being passed as separate parameters. +Usage:
    this.addEvents('storeloaded', 'storecleared');
Returns:
  • void
Observable addListenerString eventNameFunction handler[Object scope][Object options] ) : void
Appends an event handler to this object.
Appends an event handler to this object.
Parameters:
  • eventName : String
    The name of the event to listen for.
  • handler : Function
    The 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. @@ -114,8 +116,8 @@ Using the options argument, it is possible to combine different types of listene
    A delayed, one-time listener.
    myDataView.on('click', this.onClick, this, {
    -    single: true,
    -    delay: 100
    +single: true,
    +delay: 100
     });

    Attaching multiple handlers in 1 call
    @@ -123,45 +125,77 @@ The method also allows for a single argument to be passed which is a config obje which specify multiple handlers.

    myGridPanel.on({
    -    'click' : {
    -        fn: this.onClick,
    -        scope: this,
    -        delay: 100
    -    },
    -    'mouseover' : {
    -        fn: this.onMouseOver,
    -        scope: this
    -    },
    -    'mouseout' : {
    -        fn: this.onMouseOut,
    -        scope: this
    -    }
    +'click' : {
    +    fn: this.onClick,
    +    scope: this,
    +    delay: 100
    +},
    +'mouseover' : {
    +    fn: this.onMouseOver,
    +    scope: this
    +},
    +'mouseout' : {
    +    fn: this.onMouseOut,
    +    scope: this
    +}
     });

    Or a shorthand syntax:

    myGridPanel.on({
    -    'click' : this.onClick,
    -    'mouseover' : this.onMouseOver,
    -    'mouseout' : this.onMouseOut,
    -     scope: this
    -});
Returns:
  • void
Observable enableBubbleObject events ) +'click' : this.onClick, +'mouseover' : this.onMouseOver, +'mouseout' : this.onMouseOut, + scope: this +});
Returns:
Observable enableBubbleString/Array events ) : - void
Used to enable bubbling of events
Used to enable bubbling of events
Parameters:
  • events : Object
Returns:
  • void
Observable fireEventString eventNameObject... args ) + void
Enables 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');
+        }
+    }
+});
Parameters:
  • events : String/Array
    The event name to bubble, or an Array of event names.
Returns:
  • void
Observable fireEventString eventNameObject... args ) : Boolean
Fires the specified event with the passed parameters (minus the event name). An event may be set to bubble up an Obse...

Fires the specified event with the passed parameters (minus the event name).

An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by calling enableBubble.

Parameters:
  • eventName : String
    The name of the event to fire.
  • args : Object...
    Variable number of parameters are passed to handlers.
Returns:
  • Boolean
    returns false if any of the handlers return false otherwise it returns true.
Observable formUpdateString/HTMLElement form[String url][Boolean reset][Function callback] ) : - void
Performs 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 + void

Performs 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 @@ -229,16 +263,16 @@ If params are specified it uses POST, othe...

Performs an 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 : Object
    A config object containing any of the following options:
      +data, use the callback option, or an update event handler.
      Parameters:
      • options : Object
        A 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.

        • @@ -251,11 +285,11 @@ parameters are passed:
          • options : Object

            The config object passed to the update call.

        • 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 @@ -266,17 +300,17 @@ 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:
      • void
Updater

Public Events

EventDefined By

Public Events

EventDefined By