X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/2e847cf21b8ab9d15fa167b315ca5b2fa92638fc..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.html diff --git a/docs/api/Ext.html b/docs/api/Ext.html new file mode 100644 index 00000000..9cb7ecca --- /dev/null +++ b/docs/api/Ext.html @@ -0,0 +1,876 @@ +Ext | Ext JS 4.0 Documentation +
For up to date documentation and features, visit +http://docs.sencha.com/ext-js/4-0

Sencha Documentation

+ + + + + +

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

 
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.

+
 
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:""').

+
 
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)

+
 

TBD

+

TBD

+
 

True if the Ext.fx.Anim Class is available

+

True if the Ext.fx.Anim Class is available

+
 

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

+

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

+
 

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

+

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

+
 
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.

+
 

An array containing extra enumerables for old browsers

+

An array containing extra enumerables for old browsers

+
 

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

+

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

+
 

True if the detected browser is Chrome.

+

True if the detected browser is Chrome.

+
 

True if the detected browser uses FireFox 3.0

+

True if the detected browser uses FireFox 3.0

+
 

True if the detected browser uses FireFox 3.5

+

True if the detected browser uses FireFox 3.5

+
 

True if the detected browser uses FireFox 3.6

+

True if the detected browser uses FireFox 3.6

+
 

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

+

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

+
 

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).

+
 

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).

+
 

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).

+
 

True if the detected browser is Internet Explorer.

+

True if the detected browser is Internet Explorer.

+
 

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

+

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

+
 

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

+

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

+
 

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

+

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

+
 

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

+

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

+
 

True if the detected platform is Linux.

+

True if the detected platform is Linux.

+
 

True if the detected platform is Mac OS.

+

True if the detected platform is Mac OS.

+
 

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

+

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

+
 

True if the detected browser is Opera.

+

True if the detected browser is Opera.

+
 

True if the detected browser is Opera 10.5x.

+

True if the detected browser is Opera 10.5x.

+
 

True when the document is fully initialized and ready for action

+

True when the document is fully initialized and ready for action

+
 

True if the detected browser is Safari.

+

True if the detected browser is Safari.

+
 

True if the detected browser is Safari 2.x.

+

True if the detected browser is Safari 2.x.

+
 

True if the detected browser is Safari 3.x.

+

True if the detected browser is Safari 3.x.

+
 

True if the detected browser is Safari 4.x.

+

True if the detected browser is Safari 4.x.

+
 

True if the detected browser uses WebKit.

+

True if the detected browser uses WebKit.

+
 

True if the detected platform is Windows.

+

True if the detected platform is Windows.

+
 
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.

+ +
 
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.

+
 

Old alias to typeOf +@deprecated 4.0.0 Use typeOf instead

+

Old alias to typeOf +@deprecated 4.0.0 Use typeOf instead

+
 
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

 
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    +
 
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

    +
 
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

    +
 

Shorthand for Ext.Function.bind

+

Shorthand for Ext.Function.bind

+

Returns

  • void    +
 
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    +
 

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    +
 
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

    +
 
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.

    +
 

Convenient shorthand, see Ext.ClassManager.instantiate

+

Convenient shorthand, see Ext.ClassManager.instantiate

+

Returns

  • void    +
 

Convenient shorthand, see Ext.ClassManager.instantiateByAlias

+

Convenient shorthand, see Ext.ClassManager.instantiateByAlias

+

Returns

  • void    +
 
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

    +
 

Shorthand for Ext.Function.defer

+

Shorthand for Ext.Function.defer

+

Returns

  • void    +
 

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

+

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

+

Returns

  • void    +
 
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

Returns

  • void    +
 
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    +
 

Convenient alias to Ext.Array.each

+

Convenient alias to Ext.Array.each

+

Returns

  • void    +
 

A reusable empty function

+

A reusable empty function

+

Returns

  • void    +
 
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

    +
 
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

 

Convenient shortcut to Ext.Loader.exclude

+

Convenient shortcut to Ext.Loader.exclude

+

Returns

  • void    +
 
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

    +
 

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    +
 
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)

    +
 
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)

    +
 

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

    +
 

Convenient shorthand, see Ext.ClassManager.getClass

+

Convenient shorthand, see Ext.ClassManager.getClass

+

Returns

  • void    +
 
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.

    +
 

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

    +
 
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

    +
 

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

    +
 

Returns the current orientation of the mobile device

+

Returns the current orientation of the mobile device

+

Returns

  • String   

    Either 'portrait' or 'landscape'

    +
 
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.

    +
 
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    +
 
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

    +
 
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

    +
 
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.

    +
 
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

    +
 
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    +
 
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    +
 
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    +
 
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    +
 
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    +
 
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    +
 
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    +
 
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

    +
 
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    +
 
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    +
 
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    +
 
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    +
 

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    +
 

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    +
 

A convenient alias method for Ext.Object.merge

+

A convenient alias method for Ext.Object.merge

+

Returns

  • 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    +
 
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

    +
 

Convenient alias for Ext.namespace

+

Convenient alias for Ext.namespace

+

Returns

  • 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    +
 
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    +
 
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    +
 
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

    +
 

Shorthand for Ext.Function.pass

+

Shorthand for Ext.Function.pass

+

Returns

  • 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    +
 
preg( +String ptype, Constructor cls) + : void

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    +
 
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    +
 
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

    +
 
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    +
 

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    +
 
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    +
 

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    +
 

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

+

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

+

Returns

  • void    +
 
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

    +
 
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

    +
 
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    +
 

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    +
 
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

    +
 

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    +
 

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    +
 
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

    +
 
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

    +
 
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    +
 
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

    +
\ No newline at end of file