For up to date documentation and features, visit http://docs.sencha.com/ext-js/4-0

## Sencha Documentation

# Ext

The Ext namespace (global object) encapsulates all classes, singletons, and utility methods provided by Sencha's libraries.

Most user interface Components are at a lower level of nesting in the namespace, but many common utility functions are provided as direct properties of the Ext namespace.

Also many frequently used methods from other classes are provided as shortcuts within the Ext namespace. For example Ext.getCmp aliases Ext.ComponentManager.get.

Many applications are initiated with Ext.onReady which is called once the DOM is ready. This ensures all scripts have been loaded, preventing dependency issues. For example

     Ext.onReady(function(){
         new Ext.Component({
             renderTo: document.body,
             html: 'DOM ready!'
         });
     });

For more information about how to use the Ext classes, see

The Learning Center The FAQ The forums

Defined By

### Properties

Ext
view source
BLANK_IMAGE_URL : String
URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. In older versions o...

URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. In older versions of IE, this defaults to "http://sencha.com/s.gif" and you should change this to a URL on your server. For other browsers it uses an inline data URL.

Ext
view source
SSL_SECURE_URL : String
URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent the IE insecure content...

URL to a blank file used by Ext when in secure mode for iframe src and onReady src to prevent the IE insecure content warning (`'about:blank'`, except for IE in secure mode, which is `'javascript:""'`).

Ext
view source
USE_NATIVE_JSON : Boolean
Indicates whether to use native browser parsing for JSON methods. This option is ignored if the browser does not supp...

Indicates whether to use native browser parsing for JSON methods. This option is ignored if the browser does not support native JSON methods. Note: Native JSON methods will not work with objects that have functions. Also, property names must be quoted, otherwise the data will not parse. (Defaults to false)

Ext
view source
application : Function

TBD

TBD

Ext
view source
enableFx : Boolean

True if the Ext.fx.Anim Class is available

True if the Ext.fx.Anim Class is available

Ext
view source
enableGarbageCollector : Boolean

True to automatically uncache orphaned Ext.core.Elements periodically (defaults to true)

True to automatically uncache orphaned Ext.core.Elements periodically (defaults to true)

Ext
view source
enableListenerCollection : Boolean

True to automatically purge event listeners during garbageCollection (defaults to true).

True to automatically purge event listeners during garbageCollection (defaults to true).

Ext
view source
enableNestedListenerRemoval : Boolean
EXPERIMENTAL - True to cascade listener removal to child elements when an element is removed. Currently not optimized...

EXPERIMENTAL - True to cascade listener removal to child elements when an element is removed. Currently not optimized for performance.

Ext
view source
enumerables : Array

An array containing extra enumerables for old browsers

An array containing extra enumerables for old browsers

Ext
view source
isArray : Object

Returns true if the passed value is a JavaScript Array, false otherwise.

Returns true if the passed value is a JavaScript Array, false otherwise.

Ext
view source
isChrome : Boolean

True if the detected browser is Chrome.

True if the detected browser is Chrome.

Ext
view source
isFF3_0 : Boolean

True if the detected browser uses FireFox 3.0

True if the detected browser uses FireFox 3.0

Ext
view source
isFF3_5 : Boolean

True if the detected browser uses FireFox 3.5

True if the detected browser uses FireFox 3.5

Ext
view source
isFF3_6 : Boolean

True if the detected browser uses FireFox 3.6

True if the detected browser uses FireFox 3.6

Ext
view source
isFunction : Object

Returns true if the passed value is a JavaScript Function, false otherwise.

Returns true if the passed value is a JavaScript Function, false otherwise.

Ext
view source
isGecko : Boolean

True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox).

True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox).

Ext
view source
isGecko3 : Boolean

True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x).

True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x).

Ext
view source
isGecko4 : Boolean

True if the detected browser uses a Gecko 2.0+ layout engine (e.g. Firefox 4.x).

True if the detected browser uses a Gecko 2.0+ layout engine (e.g. Firefox 4.x).

Ext
view source
isIE : Boolean

True if the detected browser is Internet Explorer.

True if the detected browser is Internet Explorer.

Ext
view source
isIE6 : Boolean

True if the detected browser is Internet Explorer 6.x.

True if the detected browser is Internet Explorer 6.x.

Ext
view source
isIE7 : Boolean

True if the detected browser is Internet Explorer 7.x.

True if the detected browser is Internet Explorer 7.x.

Ext
view source
isIE8 : Boolean

True if the detected browser is Internet Explorer 8.x.

True if the detected browser is Internet Explorer 8.x.

Ext
view source
isIE9 : Boolean

True if the detected browser is Internet Explorer 9.x.

True if the detected browser is Internet Explorer 9.x.

Ext
view source
isLinux : Boolean

True if the detected platform is Linux.

True if the detected platform is Linux.

Ext
view source
isMac : Boolean

True if the detected platform is Mac OS.

True if the detected platform is Mac OS.

Ext
view source
isObject : Object

Returns true if the passed value is a JavaScript Object, false otherwise.

Returns true if the passed value is a JavaScript Object, false otherwise.

Ext
view source
isOpera : Boolean

True if the detected browser is Opera.

True if the detected browser is Opera.

Ext
view source
isOpera10_5 : Boolean

True if the detected browser is Opera 10.5x.

True if the detected browser is Opera 10.5x.

Ext
view source
isReady : Boolean

True when the document is fully initialized and ready for action

True when the document is fully initialized and ready for action

Ext
view source
isSafari : Boolean

True if the detected browser is Safari.

True if the detected browser is Safari.

Ext
view source
isSafari2 : Boolean

True if the detected browser is Safari 2.x.

True if the detected browser is Safari 2.x.

Ext
view source
isSafari3 : Boolean

True if the detected browser is Safari 3.x.

True if the detected browser is Safari 3.x.

Ext
view source
isSafari4 : Boolean

True if the detected browser is Safari 4.x.

True if the detected browser is Safari 4.x.

Ext
view source
isWebKit : Boolean

True if the detected browser uses WebKit.

True if the detected browser uses WebKit.

Ext
view source
isWindows : Boolean

True if the detected platform is Windows.

True if the detected platform is Windows.

Ext
view source
removeNode : Object
Removes a DOM node from the document. Removes this element from the document, removes all DOM event listeners, and d...

Removes a DOM node from the document.

Removes this element from the document, removes all DOM event listeners, and deletes the cache reference. All DOM event listeners are removed from this element. If Ext.enableNestedListenerRemoval is `true`, then DOM event listeners are also removed from all child nodes. The body node will be ignored if passed in.

Ext
view source
scopeResetCSS : Boolean
True to scope the reset CSS to be just applied to Ext components. Note that this wraps root containers with an additi...

True to scope the reset CSS to be just applied to Ext components. Note that this wraps root containers with an additional element. Also remember that when you turn on this option, you have to use ext-all-scoped { unless you use the bootstrap.js to load your javascript, in which case it will be handled for you.

Ext
view source
type : Object

Old alias to typeOf @deprecated 4.0.0 Use typeOf instead

Old alias to typeOf @deprecated 4.0.0 Use typeOf instead

Ext
view source
useShims : Boolean
By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash, you may wa...

By default, Ext intelligently decides whether floating elements should be shimmed. If you are using flash, you may want to set this to true.

Defined By

### Methods

Ext
view source
addBehaviors( Object obj) : void
Applies event listeners to elements by selectors when the document is ready. The event name is specified with an @...

Applies event listeners to elements by selectors when the document is ready. The event name is specified with an `@` suffix.

    Ext.addBehaviors({
        // add a listener for click on all anchors in element with id foo
        '#foo a@click' : function(e, t){
            // do something
        },

        // add the same listener to multiple selectors (separated by comma BEFORE the @)
        '#foo a, #bar span.some-class@mouseover' : function(){
            // do something
        }
    });

### Parameters

- obj : Object

  The list of behaviors to apply

### Returns

- void

Ext
view source
apply( Object object, Object config, Object defaults) : Object
Copies all the properties of config to the specified object. Note that if recursive merging and cloning without refer...

Copies all the properties of config to the specified object. Note that if recursive merging and cloning without referencing the original objects / arrays is needed, use Ext.Object.merge instead.

### Parameters

- object : Object

  The receiver of the properties

- config : Object

  The source of the properties

- defaults : Object

  A different object that will also be applied for default values

### Returns

- Object

  returns obj

Ext
view source
applyIf( Object object, Object config) : Object

Copies all the properties of config to object if they don't already exist. @function

Copies all the properties of config to object if they don't already exist. @function

### Parameters

- object : Object

  The receiver of the properties

- config : Object

  The source of the properties

### Returns

- Object

  returns obj

Ext
view source
bind : void

Shorthand for Ext.Function.bind

Shorthand for Ext.Function.bind

### Returns

- void

Ext
view source
callback( Function callback, [Object scope], [Array args], [Number delay]) : void

Execute a callback function in a particular scope. If no function is passed the call is ignored.

Execute a callback function in a particular scope. If no function is passed the call is ignored.

### Parameters

- callback : Function

  The callback to execute

- scope : Object

  (optional) The scope to execute in

- args : Array

  (optional) The arguments to pass to the function

- delay : Number

  (optional) Pass a number to delay the call by a number of milliseconds.

### Returns

- void

Ext
view source
clean : void

Old alias to Ext.Array.clean @deprecated 4.0.0 Use Ext.Array.clean instead

Old alias to Ext.Array.clean @deprecated 4.0.0 Use Ext.Array.clean instead

### Returns

- void

Ext
view source
clone( Mixed item) : Mixed

Clone almost any type of variable including array, object, DOM nodes and Date without keeping the old reference

Clone almost any type of variable including array, object, DOM nodes and Date without keeping the old reference

### Parameters

- item : Mixed

  The variable to clone

### Returns

- Mixed

  clone

Ext
view source
copyTo( Object dest, Object source, Array/String names, Boolean usePrototypeKeys) : Object
Copies a set of named properties fom the source object to the destination object. example: ImageComponent = Ext.exte...

Copies a set of named properties fom the source object to the destination object.

example:

    ImageComponent = Ext.extend(Ext.Component, {
        initComponent: function() {
            this.autoEl = { tag: 'img' };
            MyComponent.superclass.initComponent.apply(this, arguments);
            this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height');
        }
    });

Important note: To borrow class prototype methods, use Ext.Base.borrow instead.

### Parameters

- dest : Object

  The destination object.

- source : Object

  The source object.

- names : Array/String

  Either an Array of property names, or a comma-delimited list of property names to copy.

- usePrototypeKeys : Boolean

  (Optional) Defaults to false. Pass true to copy keys off of the prototype as well as the instance.

### Returns

- Object

  The modified object.

Ext
view source
create : void

Convenient shorthand, see Ext.ClassManager.instantiate

Convenient shorthand, see Ext.ClassManager.instantiate

### Returns

- void

Ext
view source
createByAlias : void

Convenient shorthand, see Ext.ClassManager.instantiateByAlias

Convenient shorthand, see Ext.ClassManager.instantiateByAlias

### Returns

- void

Ext
view source
decode( String json, [Boolean safe]) : Object

Shorthand for Ext.JSON.decode

Shorthand for Ext.JSON.decode

### Parameters

- json : String

  The JSON string

- safe : Boolean

  (optional) Whether to return null or throw an exception if the JSON is invalid.

### Returns

- Object

  The resulting object

Ext
view source
defer : void

Shorthand for Ext.Function.defer

Shorthand for Ext.Function.defer

### Returns

- void

Ext
view source
define : void

Convenient shorthand for Ext.ClassManager.create, see detailed explanation

Convenient shorthand for Ext.ClassManager.create, see detailed explanation

### Returns

- void

Ext
view source
destroy( Mixed arg1, [Mixed arg2], [Mixed etc]) : void
Attempts to destroy any objects passed to it by removing all event listeners, removing them from the DOM (if applicab...

Attempts to destroy any objects passed to it by removing all event listeners, removing them from the DOM (if applicable) and calling their destroy functions (if available). This method is primarily intended for arguments of type Ext.core.Element and Ext.Component, but any subclass of Ext.util.Observable can be passed in. Any number of elements and/or components can be passed into this function in a single call as separate arguments.

### Parameters

- arg1 : Mixed

  An Ext.core.Element, Ext.Component, or an Array of either of these to destroy

- arg2 : Mixed

  (optional)

- etc : Mixed

  ... (optional)

### Returns

- void

Ext
view source
destroyMembers( Object o, Mixed arg1, Mixed etc, Object etc) : void

Attempts to destroy and then remove a set of named properties of the passed object.

Attempts to destroy and then remove a set of named properties of the passed object.

### Parameters

- o : Object

  The object (most likely a Component) who's properties you wish to destroy.

- arg1 : Mixed

  The name of the property to destroy and remove from the object.

- etc : Mixed

  ... More property names to destroy and remove.

- etc : Object

### Returns

- void

Ext
view source
each : void

Convenient alias to Ext.Array.each

Convenient alias to Ext.Array.each

### Returns

- void

Ext
view source
emptyFn : void

A reusable empty function

A reusable empty function

### Returns

- void

Ext
view source
encode( Mixed o) : String

Shorthand for Ext.JSON.encode

Shorthand for Ext.JSON.encode

### Parameters

- o : Mixed

  The variable to encode

### Returns

- String

  The JSON string

Ext
view source
escapeRe( String str) : String

Escapes the passed string for use in a regular expression

Escapes the passed string for use in a regular expression

### Parameters

- str : String

### Returns

- String

  @deprecated 4.0.0 Use Ext.String.escapeRegex instead

Ext
view source
exclude : void

Convenient shortcut to Ext.Loader.exclude

Convenient shortcut to Ext.Loader.exclude

### Returns

- void

Ext
view source
extend( Function superclass, Object overrides) : Function

This method deprecated. Use Ext.define instead. @function

This method deprecated. Use Ext.define instead. @function

### Parameters

- superclass : Function
- overrides : Object

### Returns

- Function

  The subclass constructor from the `overrides` parameter, or a generated one if not provided. @deprecated 4.0.0 Use Ext.define instead

Ext
view source
flatten : void

Old alias to Ext.Array.flatten @deprecated 4.0.0 Use Ext.Array.flatten instead

Old alias to Ext.Array.flatten @deprecated 4.0.0 Use Ext.Array.flatten instead

### Returns

- void

Ext
view source
fly( String/HTMLElement el, [String named]) : Element
Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to t...

Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - the dom node can be overwritten by other code. Shorthand of Ext.core.Element.fly

Use this to make one-time references to DOM elements which are not going to be accessed again either by application code, or by Ext's classes. If accessing an element which will be processed regularly, then Ext.get will be more appropriate to take advantage of the caching provided by the Ext.core.Element class.

### Parameters

- el : String/HTMLElement

  The dom node or id

- named : String

  (optional) Allows for creation of named reusable flyweights to prevent conflicts (e.g. internally Ext uses "_global")

### Returns

- Element

  The shared Element object (or null if no matching element was found)

Ext
view source
get( Mixed el) : Element
Retrieves Ext.core.Element objects. This method does not retrieve Components. This method retrieves Ext.core.Element...

Retrieves Ext.core.Element objects.

This method does not retrieve Components. This method retrieves Ext.core.Element objects which encapsulate DOM elements. To retrieve a Component by its ID, use Ext.ComponentManager.get.

Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM.

Shorthand of Ext.core.Element.get

### Parameters

- el : Mixed

  The id of the node, a DOM Node or an existing Element.

### Returns

- Element

  The Element object (or null if no matching element was found)

Ext
view source
getBody : void

Returns the current document body as an Ext.core.Element.

Returns the current document body as an Ext.core.Element.

### Returns

- void

  Ext.core.Element The document body

Ext
view source
getClassName : void

Convenient shorthand, see Ext.ClassManager.getClass

Convenient shorthand, see Ext.ClassManager.getClass

### Returns

- void

Ext
view source
getCmp( String id) : void

This is shorthand reference to Ext.ComponentManager.get. Looks up an existing Component by id

This is shorthand reference to Ext.ComponentManager.get. Looks up an existing Component by id

### Parameters

- id : String

  The component id

### Returns

- void

  Ext.Component The Component, `undefined` if not found, or `null` if a Class was found.

Ext
view source
getDoc : void

Returns the current HTML document object as an Ext.core.Element.

Returns the current HTML document object as an Ext.core.Element.

### Returns

- void

  Ext.core.Element The document

Ext
view source
getDom( Mixed el, Object strict) : void
Return the dom node for the passed String (id), dom node, or Ext.core.Element. Optional 'strict' flag is needed for I...

Return the dom node for the passed String (id), dom node, or Ext.core.Element. Optional 'strict' flag is needed for IE since it can return 'name' and 'id' elements by using getElementById. Here are some examples:

    // gets dom node based on id
    var elDom = Ext.getDom('elId');
    // gets dom node based on the dom node
    var elDom1 = Ext.getDom(elDom);

    // If we don't know if we are working with an
    // Ext.core.Element or a dom node use Ext.getDom
    function(el){
        var dom = Ext.getDom(el);
        // do something with the dom node
    }

Note: the dom node to be found actually needs to exist (be rendered, etc) when this method is called to be successful.

### Parameters

- el : Mixed
- strict : Object

### Returns

- void

  HTMLElement

Ext
view source
getHead : void

Returns the current document head as an Ext.core.Element.

Returns the current document head as an Ext.core.Element.

### Returns

- void

  Ext.core.Element The document head

Ext
view source
getOrientation : String

Returns the current orientation of the mobile device

Returns the current orientation of the mobile device

### Returns

- String

  Either 'portrait' or 'landscape'

Ext
view source
getScrollBarWidth( [Boolean force]) : Number
Utility method for getting the width of the browser scrollbar. This can differ depending on operating system settings...

Utility method for getting the width of the browser scrollbar. This can differ depending on operating system settings, such as the theme or font size.

### Parameters

- force : Boolean

  (optional) true to force a recalculation of the value.

### Returns

- Number

  The width of the scrollbar.

Ext
view source
getStore( String/Object id) : Ext.data.Store

Gets a registered Store by id (shortcut to lookup)

Gets a registered Store by id (shortcut to lookup)

### Parameters

- id : String/Object

  The id of the Store, or a Store instance

### Returns

- Ext.data.Store

Ext
view source
htmlDecode( String value) : String

Convert certain characters (&, <, >, and ') from their HTML character equivalents.

Convert certain characters (&, <, >, and ') from their HTML character equivalents.

### Parameters

- value : String

  The string to decode

### Returns

- String

  The decoded text

Ext
view source
htmlEncode( String value) : String
Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pag...

Convert certain characters (&, <, >, and ') to their HTML character equivalents for literal display in web pages.

### Parameters

- value : String

  The string to encode

### Returns

- String

  The encoded text

Ext
view source
id( [Mixed el], [String prefix]) : String

Generates unique ids. If the element already has an id, it is unchanged

Generates unique ids. If the element already has an id, it is unchanged

### Parameters

- el : Mixed

  (optional) The element to generate an id for

- prefix : String

  (optional) Id prefix (defaults "ext-gen")

### Returns

- String

  The generated Id.

Ext
view source
invoke( Array|NodeList arr, String methodName, ...* args) : Array
Invokes a method on each item in an Array. // Example: Ext.invoke(Ext.query("p"), "getAttribute", "id"); // [el1.get...

Invokes a method on each item in an Array.

    // Example:
    Ext.invoke(Ext.query("p"), "getAttribute", "id");
    // [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]

### Parameters

- arr : Array|NodeList

  The Array of items to invoke the method on.

- methodName : String

  The method name to invoke.

- args : ...*

  Arguments to send into the method invocation.

### Returns

- Array

  The results of invoking the method on each item in the array. @deprecated 4.0.0 Will be removed in the next major version

Ext
view source
isBoolean( Mixed value) : Boolean

Returns true if the passed value is a boolean.

Returns true if the passed value is a boolean.

### Parameters

- value : Mixed

  The value to test

### Returns

- Boolean

Ext
view source
isDate( Object object) : Boolean

Returns true if the passed value is a JavaScript Date object, false otherwise.

Returns true if the passed value is a JavaScript Date object, false otherwise.

### Parameters

- object : Object

  The object to test

### Returns

- Boolean

Ext
view source
isDefined( Mixed value) : Boolean

Returns true if the passed value is defined.

Returns true if the passed value is defined.

### Parameters

- value : Mixed

  The value to test

### Returns

- Boolean

Ext
view source
isElement( Mixed value) : Boolean

Returns true if the passed value is an HTMLElement

Returns true if the passed value is an HTMLElement

### Parameters

- value : Mixed

  The value to test

### Returns

- Boolean

Ext
view source
isEmpty( Mixed value, [Boolean allowEmptyString]) : Boolean
Returns true if the passed value is empty, false otherwise. The value is deemed to be empty if it is either: null u...

Returns true if the passed value is empty, false otherwise. The value is deemed to be empty if it is either:

- `null`
- `undefined`
- a zero-length array
- a zero-length string (Unless the `allowEmptyString` parameter is set to `true`)

### Parameters

- value : Mixed

  The value to test

- allowEmptyString : Boolean

  (optional) true to allow empty strings (defaults to false)

### Returns

- Boolean

Ext
view source
isIterable( Mixed value) : Boolean

Returns true if the passed value is iterable, false otherwise

Returns true if the passed value is iterable, false otherwise

### Parameters

- value : Mixed

  The value to test

### Returns

- Boolean

Ext
view source
isNumber( Mixed value) : Boolean

Returns true if the passed value is a number. Returns false for non-finite numbers.

Returns true if the passed value is a number. Returns false for non-finite numbers.

### Parameters

- value : Mixed

  The value to test

### Returns

- Boolean

Ext
view source
isNumeric( Mixed value) : Boolean

Validates that a value is numeric.

Validates that a value is numeric.

### Parameters

- value : Mixed

  Examples: 1, '1', '2.34'

### Returns

- Boolean

  True if numeric, false otherwise

Ext
view source
isPrimitive( Mixed value) : Boolean

Returns true if the passed value is a JavaScript 'primitive', a string, number or boolean.

Returns true if the passed value is a JavaScript 'primitive', a string, number or boolean.

### Parameters

- value : Mixed

  The value to test

### Returns

- Boolean

Ext
view source
isString( Mixed value) : Boolean

Returns true if the passed value is a string.

Returns true if the passed value is a string.

### Parameters

- value : Mixed

  The value to test

### Returns

- Boolean

Ext
view source
isTextNode( Mixed value) : Boolean

Returns true if the passed value is a TextNode

Returns true if the passed value is a TextNode

### Parameters

- value : Mixed

  The value to test

### Returns

- Boolean

Ext
view source
iterate( Object/Array object, Function fn, Object scope) : void
Iterates either an array or an object. This method delegates to Ext.Array.each if the given value is iterable, and Ex...

Iterates either an array or an object. This method delegates to Ext.Array.each if the given value is iterable, and Ext.Object.each otherwise.

### Parameters

- object : Object/Array

  The object or array to be iterated.

- fn : Function

  The function to be called for each iteration. See and Ext.Array.each and Ext.Object.each for detailed lists of arguments passed to this function depending on the given object type that is being iterated.

- scope : Object

  (Optional) The scope (`this` reference) in which the specified function is executed. Defaults to the object being iterated itself.

### Returns

- void

Ext
view source
max : void

Old alias to Ext.Array.max @deprecated 4.0.0 Use Ext.Array.max instead

Old alias to Ext.Array.max @deprecated 4.0.0 Use Ext.Array.max instead

### Returns

- void

Ext
view source
mean : void

Old alias to Ext.Array.mean @deprecated 4.0.0 Use Ext.Array.mean instead

Old alias to Ext.Array.mean @deprecated 4.0.0 Use Ext.Array.mean instead

### Returns

- void

Ext
view source
merge : void

A convenient alias method for Ext.Object.merge

A convenient alias method for Ext.Object.merge

### Returns

- void

Ext
view source
min : void

Old alias to Ext.Array.min @deprecated 4.0.0 Use Ext.Array.min instead

Old alias to Ext.Array.min @deprecated 4.0.0 Use Ext.Array.min instead

### Returns

- void

Ext
view source
namespace( String namespace1, String namespace2, String etc) : Object
Creates namespaces to be used for scoping variables and classes so that they are not global. Specifying the last node...

Creates namespaces to be used for scoping variables and classes so that they are not global. Specifying the last node of a namespace implicitly creates all other nodes. Usage:

    Ext.namespace('Company', 'Company.data');

     // equivalent and preferable to the above syntax
    Ext.namespace('Company.data');

    Company.Widget = function() { ... };

    Company.data.CustomStore = function(config) { ... };

### Parameters

- namespace1 : String
- namespace2 : String
- etc : String

### Returns

- Object

  The namespace object. (If multiple arguments are passed, this will be the last namespace created) @function

Ext
view source
ns : void

Convenient alias for Ext.namespace

Convenient alias for Ext.namespace

### Returns

- void

Ext
view source
num : void

This method is deprecated, please use Ext.Number.from instead

@deprecated 4.0.0 Replaced by Ext.Number.from

This method is deprecated, please use Ext.Number.from instead

@deprecated 4.0.0 Replaced by Ext.Number.from

### Returns

- void

Ext
view source
onDocumentReady : void

Alias for Ext.EventManager.onDocumentReady

Alias for Ext.EventManager.onDocumentReady

### Returns

- void

Ext
view source
onReady( Object fn, Object scope, Object options) : void

Alias for Ext.Loader.onReady with withDomReady set to true

Alias for Ext.Loader.onReady with withDomReady set to true

### Parameters

- fn : Object
- scope : Object
- options : Object

### Returns

- void

Ext
view source
override( Object cls, Object overrides) : void
Proxy to Ext.Base.override. Please refer Ext.Base.override for further details. Ext.define('My.cool.Class', { sa...

Proxy to Ext.Base.override. Please refer Ext.Base.override for further details.

    Ext.define('My.cool.Class', {
        sayHi: function() {
            alert('Hi!');
        }
    }

    Ext.override(My.cool.Class, {
        sayHi: function() {
            alert('About to say...');

            this.callOverridden();
        }
    });

    var cool = new My.cool.Class();
    cool.sayHi(); // alerts 'About to say...'
                  // alerts 'Hi!'

Please note that `this.callOverridden()` only works if the class was previously created with {@link Ext#define)

### Parameters

- cls : Object

  The class to override

- overrides : Object

  The list of functions to add to origClass. This should be specified as an object literal containing one or more methods.

### Returns

- void

Ext
view source
partition( Array|NodeList arr, [Function truth]) : Array
Partitions the set into two sets: a true set and a false set. Example: Example2: // Example 1: Ext.partition([true, ...

Partitions the set into two sets: a true set and a false set. Example: Example2:

    // Example 1:
    Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]

    // Example 2:
    Ext.partition(
        Ext.query("p"),
        function(val){
            return val.className == "class1"
        }
    );
    // true are those paragraph elements with a className of "class1",
    // false set are those that do not have that className.

### Parameters

- arr : Array|NodeList

  The array to partition

- truth : Function

  (optional) a function to determine truth. If this is omitted the element

                    itself must be able to be evaluated for its truthfulness.

### Returns

- Array

  [true,false] @deprecated 4.0.0 Will be removed in the next major version

Ext
view source
pass : void

Shorthand for Ext.Function.pass

Shorthand for Ext.Function.pass

### Returns

- void

Ext
view source
pluck : void

Old alias to Ext.Array.pluck @deprecated 4.0.0 Use Ext.Array.pluck instead

Old alias to Ext.Array.pluck @deprecated 4.0.0 Use Ext.Array.pluck instead

### Returns

- void

Ext
view source
preg( String ptype, Constructor cls) : void

Shorthand for Ext.PluginManager.registerType

Shorthand for Ext.PluginManager.registerType

### Parameters

- ptype : String

  The ptype mnemonic string by which the Plugin class may be looked up.

- cls : Constructor

  The new Plugin class.

### Returns

- void

Ext
view source
query( String path, [Node root]) : Array

Selects an array of DOM nodes by CSS/XPath selector. Shorthand of Ext.DomQuery.select

Selects an array of DOM nodes by CSS/XPath selector. Shorthand of Ext.DomQuery.select

### Parameters

- path : String

  The selector/xpath query

- root : Node

  (optional) The start of the query (defaults to document).

### Returns

- Array

Ext
view source
regModel( Object config) : Ext.data.Model

Creates a new Model class from the specified config object. See Ext.data.Model for full examples.

Creates a new Model class from the specified config object. See Ext.data.Model for full examples.

### Parameters

- config : Object

  A configuration object for the Model you wish to create.

### Returns

- Ext.data.Model

  The newly registered Model

Ext
view source
regStore( String id, Object config, Constructor cls) : void
Creates a new store for the given id and config, then registers it with the Store Mananger. Sample usage: Ex...

Creates a new store for the given id and config, then registers it with the Store Mananger. Sample usage:

        Ext.regStore('AllUsers', {
            model: 'User'
        });

        //the store can now easily be used throughout the application
        new Ext.List({
            store: 'AllUsers',
            ... other config
        });

### Parameters

- id : String

  The id to set on the new store

- config : Object

  The store config

- cls : Constructor

  The new Component class.

### Returns

- void

Ext
view source
require : void

Convenient alias of Ext.Loader.require. Please see the introduction documentation of Ext.Loader for examples.

Convenient alias of Ext.Loader.require. Please see the introduction documentation of Ext.Loader for examples.

### Returns

- void

Ext
view source
select( String/Array selector, [HTMLElement/String root]) : CompositeElementLite/CompositeElement
Selects elements based on the passed CSS selector to enable Element methods to be applied to many related elements in...

Selects elements based on the passed CSS selector to enable Element methods to be applied to many related elements in one statement through the returned CompositeElement or CompositeElementLite object.

### Parameters

- selector : String/Array

  The CSS selector or an array of elements

- root : HTMLElement/String

  (optional) The root element of the query or id of the root

### Returns

- CompositeElementLite/CompositeElement

Ext
view source
sum : void

Old alias to Ext.Array.sum @deprecated 4.0.0 Use Ext.Array.sum instead

Old alias to Ext.Array.sum @deprecated 4.0.0 Use Ext.Array.sum instead

### Returns

- void

Ext
view source
syncRequire : void

Synchronous version of require, convenient alias of Ext.Loader.syncRequire.

Synchronous version of require, convenient alias of Ext.Loader.syncRequire.

### Returns

- void

Ext
view source
toArray( Iterable the) : Array

Convenient alias to Ext.Array.toArray

Convenient alias to Ext.Array.toArray

### Parameters

- the : Iterable

  iterable object to be turned into a true Array.

### Returns

- Array

  array

Ext
view source
toSentence( Array items, String connector) : String
Turns an array into a sentence, joined by a specified connector - e.g.: Ext.toSentence(['Adama', 'Tigh', 'Roslin']); ...

Turns an array into a sentence, joined by a specified connector - e.g.: Ext.toSentence(['Adama', 'Tigh', 'Roslin']); //'Adama, Tigh and Roslin' Ext.toSentence(['Adama', 'Tigh', 'Roslin'], 'or'); //'Adama, Tigh or Roslin'

### Parameters

- items : Array

  The array to create a sentence from

- connector : String

  The string to use to connect the last two words. Usually 'and' or 'or' - defaults to 'and'.

### Returns

- String

  The sentence string @deprecated 4.0.0 Will be removed in the next major version

Ext
view source
typeOf( Mixed value) : String
Returns the type of the given variable in string format. List of possible values are: undefined: If the given value...

Returns the type of the given variable in string format. List of possible values are:

- `undefined`: If the given value is `undefined`
- `null`: If the given value is `null`
- `string`: If the given value is a string
- `number`: If the given value is a number
- `boolean`: If the given value is a boolean value
- `date`: If the given value is a `Date` object
- `function`: If the given value is a function reference
- `object`: If the given value is an object
- `array`: If the given value is an array
- `regexp`: If the given value is a regular expression
- `element`: If the given value is a DOM Element
- `textnode`: If the given value is a DOM text node and contains something other than whitespace
- `whitespace`: If the given value is a DOM text node and contains only whitespace

### Parameters

- value : Mixed

### Returns

- String

Ext
view source
unique : void

Old alias to Ext.Array.unique @deprecated 4.0.0 Use Ext.Array.unique instead

Old alias to Ext.Array.unique @deprecated 4.0.0 Use Ext.Array.unique instead

### Returns

- void

Ext
view source
urlAppend( String url, String s) : void

Appends content to the query string of a URL, handling logic for whether to place a question mark or ampersand.

Appends content to the query string of a URL, handling logic for whether to place a question mark or ampersand.

### Parameters

- url : String

  The URL to append to.

- s : String

  The content to append to the URL.

### Returns

- void

  (String) The resulting URL

Ext
view source
urlDecode : void

A convenient alias method for Ext.Object.fromQueryString @deprecated 4.0.0 Use Ext.Object.fromQueryString instead

A convenient alias method for Ext.Object.fromQueryString @deprecated 4.0.0 Use Ext.Object.fromQueryString instead

### Returns

- void

Ext
view source
urlEncode : void

A convenient alias method for Ext.Object.toQueryString @deprecated 4.0.0 Use Ext.Object.toQueryString instead

A convenient alias method for Ext.Object.toQueryString @deprecated 4.0.0 Use Ext.Object.toQueryString instead

### Returns

- void

Ext
view source
value( Mixed value, Mixed defaultValue, [Boolean allowBlank]) : Mixed
Utility method for returning a default value if the passed value is empty. The value is deemed to be empty if it is...

Utility method for returning a default value if the passed value is empty.

The value is deemed to be empty if it is

- null
- undefined
- an empty array
- a zero length string (Unless the `allowBlank` parameter is `true`)

### Parameters

- value : Mixed

  The value to test

- defaultValue : Mixed

  The value to return if the original value is empty

- allowBlank : Boolean

  (optional) true to allow zero length strings to qualify as non-empty (defaults to false)

### Returns

- Mixed

  value, if non-empty, else defaultValue @deprecated 4.0.0 Use {Ext#valueFrom} instead

Ext
view source
valueFrom( Mixed value, Mixed defaultValue, [Boolean allowBlank]) : Mixed
Returns the given value itself if it's not empty, as described in isEmpty; returns the default value (second argument...

Returns the given value itself if it's not empty, as described in isEmpty; returns the default value (second argument) otherwise.

### Parameters

- value : Mixed

  The value to test

- defaultValue : Mixed

  The value to return if the original value is empty

- allowBlank : Boolean

  (optional) true to allow zero length strings to qualify as non-empty (defaults to false)

### Returns

- Mixed

  value, if non-empty, else defaultValue

Ext
view source
widget( Object name) : void
Convenient shorthand to create a widget by its xtype, also see Ext.ClassManager.instantiateByAlias var button = Ext....

Convenient shorthand to create a widget by its xtype, also see Ext.ClassManager.instantiateByAlias

    var button = Ext.widget('button'); // Equivalent to Ext.create('widget.button')
    var panel = Ext.widget('panel'); // Equivalent to Ext.create('widget.panel')

### Parameters

- name : Object

### Returns

- void

Ext
view source
zip( Arrays|NodeLists arr, [Function zipper]) : Array
Zips N sets together. // Example 1: Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]] // Example 2: Ext.zip( [ "...

Zips N sets together.

    // Example 1:
    Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
    // Example 2:
    Ext.zip(
        [ "+", "-", "+"],
        [  12,  10,  22],
        [  43,  15,  96],
        function(a, b, c){
            return "$" + a + "" + b + "." + c
        }
    ); // ["$+12.43", "$-10.15", "$+22.96"]

### Parameters

- arr : Arrays|NodeLists

  This argument may be repeated. Array(s) to contribute values.

- zipper : Function

  (optional) The last item in the argument list. This will drive how the items are zipped together.

### Returns

- Array

  The zipped set. @deprecated 4.0.0 Will be removed in the next major version