X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..HEAD:/docs/output/Ext.Loader.js diff --git a/docs/output/Ext.Loader.js b/docs/output/Ext.Loader.js index 534767df..e56ddf11 100644 --- a/docs/output/Ext.Loader.js +++ b/docs/output/Ext.Loader.js @@ -1,430 +1 @@ -Ext.data.JsonP.Ext_Loader({ - "allMixins": [ - - ], - "deprecated": null, - "docauthor": "Jacky Nguyen ", - "members": { - "cfg": [ - { - "type": "Boolean", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Loader.html#Ext-Loader-cfg-disableCaching", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "name": "disableCaching", - "owner": "Ext.Loader", - "doc": "

Appends current timestamp to script files to prevent caching Defaults to true

\n", - "linenr": 227, - "html_filename": "Loader.html" - }, - { - "type": "String", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Loader.html#Ext-Loader-cfg-disableCachingParam", - "shortDoc": "The get parameter name for the cache buster's timestamp. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "name": "disableCachingParam", - "owner": "Ext.Loader", - "doc": "

The get parameter name for the cache buster's timestamp. Defaults to '_dc'

\n", - "linenr": 233, - "html_filename": "Loader.html" - }, - { - "type": "Boolean", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Loader.html#Ext-Loader-cfg-enabled", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "name": "enabled", - "owner": "Ext.Loader", - "doc": "

Whether or not to enable the dynamic dependency loading feature Defaults to false

\n", - "linenr": 221, - "html_filename": "Loader.html" - }, - { - "type": "Object", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "cfg", - "href": "Loader.html#Ext-Loader-cfg-paths", - "shortDoc": "The mapping from namespaces to file paths\n\n{\n 'Ext': '.', // This is set by default, Ext.layout.container.Containe...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "name": "paths", - "owner": "Ext.Loader", - "doc": "

The mapping from namespaces to file paths

\n\n
{\n    'Ext': '.', // This is set by default, Ext.layout.container.Container will be\n                // loaded from ./layout/Container.js\n\n    'My': './src/my_own_folder' // My.layout.Container will be loaded from\n                                // ./src/my_own_folder/layout/Container.js\n}\n
\n\n

Note that all relative paths are relative to the current HTML document.\nIf not being specified, for example, Other.awesome.Class\nwill simply be loaded from ./Other/awesome/Class.js

\n", - "linenr": 239, - "html_filename": "Loader.html" - } - ], - "method": [ - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Loader.html#Ext-Loader-method-exclude", - "shortDoc": "Explicitly exclude files from being loaded. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "params": [ - { - "type": "String/[String]", - "optional": false, - "doc": "\n", - "name": "excludes" - } - ], - "name": "exclude", - "owner": "Ext.Loader", - "doc": "

Explicitly exclude files from being loaded. Useful when used in conjunction with a broad include expression.\nCan be chained with more require and exclude methods, e.g.:

\n\n
Ext.exclude('Ext.data.*').require('*');\n\nExt.exclude('widget.button*').require('widget.*');\n
\n\n

Ext.exclude is alias for Ext.Loader.exclude for convenience.

\n", - "linenr": 584, - "return": { - "type": "Object", - "doc": "

object contains require method for chaining

\n" - }, - "html_filename": "Loader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Loader.html#Ext-Loader-method-getConfig", - "shortDoc": "Get the config value corresponding to the specified name. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "

The config property name

\n", - "name": "name" - } - ], - "name": "getConfig", - "owner": "Ext.Loader", - "doc": "

Get the config value corresponding to the specified name.\nIf no name is given, will return the config object.

\n", - "linenr": 298, - "return": { - "type": "Object/Mixed", - "doc": "\n" - }, - "html_filename": "Loader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Loader.html#Ext-Loader-method-getPath", - "shortDoc": "Translates a className to a file path by adding the the proper prefix and converting the .'s to /'s. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "params": [ - { - "type": "String", - "optional": false, - "doc": "\n", - "name": "className" - } - ], - "name": "getPath", - "owner": "Ext.Loader", - "doc": "

Translates a className to a file path by adding the the proper prefix and converting the .'s to /'s.\nFor example:

\n\n
Ext.Loader.setPath('My', '/path/to/My');\n\nalert(Ext.Loader.getPath('My.awesome.Class')); // alerts '/path/to/My/awesome/Class.js'\n
\n\n

Note that the deeper namespace levels, if explicitly set, are always resolved first. For example:

\n\n
Ext.Loader.setPath({\n    'My': '/path/to/lib',\n    'My.awesome': '/other/path/for/awesome/stuff',\n    'My.awesome.more': '/more/awesome/path'\n});\n\nalert(Ext.Loader.getPath('My.awesome.Class')); // alerts '/other/path/for/awesome/stuff/Class.js'\n\nalert(Ext.Loader.getPath('My.awesome.more.Class')); // alerts '/more/awesome/path/Class.js'\n\nalert(Ext.Loader.getPath('My.cool.Class')); // alerts '/path/to/lib/cool/Class.js'\n\nalert(Ext.Loader.getPath('Unknown.strange.Stuff')); // alerts 'Unknown/strange/Stuff.js'\n
\n", - "linenr": 335, - "return": { - "type": "String", - "doc": "

path

\n" - }, - "html_filename": "Loader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Loader.html#Ext-Loader-method-onReady", - "shortDoc": "Adds new listener to be executed when all required scripts are fully loaded. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "params": [ - { - "type": "Function", - "optional": false, - "doc": "

The function callback to be executed

\n", - "name": "fn" - }, - { - "type": "Object", - "optional": false, - "doc": "

The execution scope (this) of the callback function

\n", - "name": "scope" - }, - { - "type": "Boolean", - "optional": false, - "doc": "

Whether or not to wait for document dom ready as well

\n", - "name": "withDomReady" - }, - { - "type": "Object", - "optional": false, - "doc": "\n", - "name": "options" - } - ], - "name": "onReady", - "owner": "Ext.Loader", - "doc": "

Adds new listener to be executed when all required scripts are fully loaded.

\n", - "linenr": 899, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Loader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Loader.html#Ext-Loader-method-require", - "shortDoc": "Loads all classes by the given names and all their direct dependencies;\noptionally executes the given callback functi...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "params": [ - { - "type": "String/[String]", - "optional": false, - "doc": "

Can either be a string or an array of string

\n", - "name": "expressions" - }, - { - "type": "Function", - "optional": false, - "doc": "

(Optional) The callback function

\n", - "name": "fn" - }, - { - "type": "Object", - "optional": false, - "doc": "

(Optional) The execution scope (this) of the callback function

\n", - "name": "scope" - }, - { - "type": "String/[String]", - "optional": false, - "doc": "

(Optional) Classes to be excluded, useful when being used with expressions

\n", - "name": "excludes" - } - ], - "name": "require", - "owner": "Ext.Loader", - "doc": "

Loads all classes by the given names and all their direct dependencies;\noptionally executes the given callback function when finishes, within the optional scope.

\n\n

Ext.require is alias for Ext.Loader.require for convenience.

\n", - "linenr": 629, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Loader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Loader.html#Ext-Loader-method-setConfig", - "shortDoc": "Set the configuration for the loader. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "params": [ - { - "type": "String/Object", - "optional": false, - "doc": "

Name of the value to override, or a config object to override multiple values.

\n", - "name": "name" - }, - { - "type": "Object", - "optional": true, - "doc": "

(optional) The new value to set, needed if first parameter is String.

\n", - "name": "value" - } - ], - "name": "setConfig", - "owner": "Ext.Loader", - "doc": "

Set the configuration for the loader. This should be called right after ext-core.js\n(or ext-core-debug.js) is included in the page, e.g.:

\n\n
<script type=\"text/javascript\" src=\"ext-core-debug.js\"></script>\n<script type=\"text/javascript\">\n  Ext.Loader.setConfig({\n      enabled: true,\n      paths: {\n          'My': 'my_own_path'\n      }\n  });\n<script>\n<script type=\"text/javascript\">\n  Ext.require(...);\n\n  Ext.onReady(function() {\n      // application code here\n  });\n</script>\n
\n\n

Refer to config options of Ext.Loader for the list of possible properties.

\n", - "linenr": 260, - "return": { - "type": "Ext.Loader", - "doc": "

this

\n" - }, - "html_filename": "Loader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Loader.html#Ext-Loader-method-setPath", - "shortDoc": "Sets the path of a namespace. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "params": [ - { - "type": "String/Object", - "optional": false, - "doc": "

See flexSetter

\n", - "name": "name" - }, - { - "type": "String", - "optional": false, - "doc": "

See flexSetter

\n", - "name": "path" - } - ], - "name": "setPath", - "owner": "Ext.Loader", - "doc": "

Sets the path of a namespace. For Example:

\n\n
Ext.Loader.setPath('Ext', '.');\n
\n", - "linenr": 312, - "return": { - "type": "Ext.Loader", - "doc": "

this

\n" - }, - "html_filename": "Loader.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "Loader.html#Ext-Loader-method-syncRequire", - "shortDoc": "Synchronously loads all classes by the given names and all their direct dependencies;\noptionally executes the given c...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "params": [ - { - "type": "String/[String]", - "optional": false, - "doc": "

Can either be a string or an array of string

\n", - "name": "expressions" - }, - { - "type": "Function", - "optional": false, - "doc": "

(Optional) The callback function

\n", - "name": "fn" - }, - { - "type": "Object", - "optional": false, - "doc": "

(Optional) The execution scope (this) of the callback function

\n", - "name": "scope" - }, - { - "type": "String/[String]", - "optional": false, - "doc": "

(Optional) Classes to be excluded, useful when being used with expressions

\n", - "name": "excludes" - } - ], - "name": "syncRequire", - "owner": "Ext.Loader", - "doc": "

Synchronously loads all classes by the given names and all their direct dependencies;\noptionally executes the given callback function when finishes, within the optional scope.

\n\n

Ext.syncRequire is alias for Ext.Loader.syncRequire for convenience.

\n", - "linenr": 611, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "Loader.html" - } - ], - "property": [ - { - "type": "[String]", - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "property", - "href": "Loader.html#Ext-Loader-property-history", - "shortDoc": "An array of class names to keep track of the dependency loading order. ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "name": "history", - "owner": "Ext.Loader", - "doc": "

An array of class names to keep track of the dependency loading order.\nThis is not guaranteed to be the same everytime due to the asynchronous nature of the Loader.

\n", - "linenr": 209, - "html_filename": "Loader.html" - } - ], - "cssVar": [ - - ], - "cssMixin": [ - - ], - "event": [ - - ] - }, - "singleton": true, - "alias": null, - "superclasses": [ - - ], - "protected": false, - "tagname": "class", - "mixins": [ - - ], - "href": "Loader.html#Ext-Loader", - "subclasses": [ - - ], - "static": false, - "author": "Jacky Nguyen ", - "component": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Loader.js", - "private": false, - "alternateClassNames": [ - - ], - "name": "Ext.Loader", - "doc": "

Ext.Loader is the heart of the new dynamic dependency loading capability in Ext JS 4+. It is most commonly used\nvia the Ext.require shorthand. Ext.Loader supports both asynchronous and synchronous loading\napproaches, and leverage their advantages for the best development flow. We'll discuss about the pros and cons\nof each approach:

\n\n

Asynchronous Loading

\n\n\n\n\n

Method 1: Explicitly include what you need:

\n\n
// Syntax\nExt.require({String/Array} expressions);\n\n// Example: Single alias\nExt.require('widget.window');\n\n// Example: Single class name\nExt.require('Ext.window.Window');\n\n// Example: Multiple aliases / class names mix\nExt.require(['widget.window', 'layout.border', 'Ext.data.Connection']);\n\n// Wildcards\nExt.require(['widget.*', 'layout.*', 'Ext.data.*']);\n
\n\n

Method 2: Explicitly exclude what you don't need:

\n\n
// Syntax: Note that it must be in this chaining format.\nExt.exclude({String/Array} expressions)\n   .require({String/Array} expressions);\n\n// Include everything except Ext.data.*\nExt.exclude('Ext.data.*').require('*'); \n\n// Include all widgets except widget.checkbox*,\n// which will match widget.checkbox, widget.checkboxfield, widget.checkboxgroup, etc.\nExt.exclude('widget.checkbox*').require('widget.*');\n
\n\n

Synchronous Loading on Demand

\n\n\n\n\n

There's one simple rule to follow: Instantiate everything with Ext.create instead of the new keyword

\n\n
Ext.create('widget.window', { ... }); // Instead of new Ext.window.Window({...});\n\nExt.create('Ext.window.Window', {}); // Same as above, using full class name instead of alias\n\nExt.widget('window', {}); // Same as above, all you need is the traditional `xtype`\n
\n\n

Behind the scene, Ext.ClassManager will automatically check whether the given class name / alias has already\nexisted on the page. If it's not, Ext.Loader will immediately switch itself to synchronous mode and automatic load\nthe given class and all its dependencies.

\n\n

Hybrid Loading - The Best of Both Worlds

\n\n

It has all the advantages combined from asynchronous and synchronous loading. The development flow is simple:

\n\n

Step 1: Start writing your application using synchronous approach.

\n\n

Ext.Loader will automatically fetch all dependencies on demand as they're needed during run-time. For example:

\n\n
Ext.onReady(function(){\n    var window = Ext.createWidget('window', {\n        width: 500,\n        height: 300,\n        layout: {\n            type: 'border',\n            padding: 5\n        },\n        title: 'Hello Dialog',\n        items: [{\n            title: 'Navigation',\n            collapsible: true,\n            region: 'west',\n            width: 200,\n            html: 'Hello',\n            split: true\n        }, {\n            title: 'TabPanel',\n            region: 'center'\n        }]\n    });\n\n    window.show();\n})\n
\n\n

Step 2: Along the way, when you need better debugging ability, watch the console for warnings like these:

\n\n
[Ext.Loader] Synchronously loading 'Ext.window.Window'; consider adding Ext.require('Ext.window.Window') before your application's code ClassManager.js:432\n[Ext.Loader] Synchronously loading 'Ext.layout.container.Border'; consider adding Ext.require('Ext.layout.container.Border') before your application's code\n
\n\n

Simply copy and paste the suggested code above Ext.onReady, e.g.:

\n\n
Ext.require('Ext.window.Window');\nExt.require('Ext.layout.container.Border');\n\nExt.onReady(...);\n
\n\n

Everything should now load via asynchronous mode.

\n\n

Deployment

\n\n

It's important to note that dynamic loading should only be used during development on your local machines.\nDuring production, all dependencies should be combined into one single JavaScript file. Ext.Loader makes\nthe whole process of transitioning from / to between development / maintenance and production as easy as\npossible. Internally Ext.Loader.history maintains the list of all dependencies\nyour application needs in the exact loading sequence. It's as simple as concatenating all files in this\narray into one, then include it on top of your application.

\n\n

This process will be automated with Sencha Command, to be released and documented towards Ext JS 4 Final.

\n", - "mixedInto": [ - - ], - "linenr": 1, - "xtypes": [ - - ], - "html_filename": "Loader.html", - "extends": null -}); \ No newline at end of file +Ext.data.JsonP.Ext_Loader({"tagname":"class","html":"

Files

Ext.Loader is the heart of the new dynamic dependency loading capability in Ext JS 4+. It is most commonly used\nvia the Ext.require shorthand. Ext.Loader supports both asynchronous and synchronous loading\napproaches, and leverage their advantages for the best development flow. We'll discuss about the pros and cons\nof each approach:

\n\n

Asynchronous Loading

\n\n
    \n
  • Advantages:

    \n\n
      \n
    • Cross-domain
    • \n
    • No web server needed: you can run the application via the file system protocol\n(i.e: file://path/to/your/index.html)
    • \n
    • Best possible debugging experience: error messages come with the exact file name and line number
    • \n
    \n
  • \n
  • Disadvantages:

    \n\n
      \n
    • Dependencies need to be specified before-hand
    • \n
    \n
  • \n
\n\n\n

Method 1: Explicitly include what you need:

\n\n
// Syntax\nExt.require({String/Array} expressions);\n\n// Example: Single alias\nExt.require('widget.window');\n\n// Example: Single class name\nExt.require('Ext.window.Window');\n\n// Example: Multiple aliases / class names mix\nExt.require(['widget.window', 'layout.border', 'Ext.data.Connection']);\n\n// Wildcards\nExt.require(['widget.*', 'layout.*', 'Ext.data.*']);\n
\n\n

Method 2: Explicitly exclude what you don't need:

\n\n
// Syntax: Note that it must be in this chaining format.\nExt.exclude({String/Array} expressions)\n   .require({String/Array} expressions);\n\n// Include everything except Ext.data.*\nExt.exclude('Ext.data.*').require('*'); \n\n// Include all widgets except widget.checkbox*,\n// which will match widget.checkbox, widget.checkboxfield, widget.checkboxgroup, etc.\nExt.exclude('widget.checkbox*').require('widget.*');\n
\n\n

Synchronous Loading on Demand

\n\n
    \n
  • Advantages:

    \n\n
      \n
    • There's no need to specify dependencies before-hand, which is always the convenience of including\next-all.js before
    • \n
    \n
  • \n
  • Disadvantages:

    \n\n
      \n
    • Not as good debugging experience since file name won't be shown (except in Firebug at the moment)
    • \n
    • Must be from the same domain due to XHR restriction
    • \n
    • Need a web server, same reason as above
    • \n
    \n
  • \n
\n\n\n

There's one simple rule to follow: Instantiate everything with Ext.create instead of the new keyword

\n\n
Ext.create('widget.window', { ... }); // Instead of new Ext.window.Window({...});\n\nExt.create('Ext.window.Window', {}); // Same as above, using full class name instead of alias\n\nExt.widget('window', {}); // Same as above, all you need is the traditional `xtype`\n
\n\n

Behind the scene, Ext.ClassManager will automatically check whether the given class name / alias has already\nexisted on the page. If it's not, Ext.Loader will immediately switch itself to synchronous mode and automatic load\nthe given class and all its dependencies.

\n\n

Hybrid Loading - The Best of Both Worlds

\n\n

It has all the advantages combined from asynchronous and synchronous loading. The development flow is simple:

\n\n

Step 1: Start writing your application using synchronous approach.

\n\n

Ext.Loader will automatically fetch all dependencies on demand as they're needed during run-time. For example:

\n\n
Ext.onReady(function(){\n    var window = Ext.createWidget('window', {\n        width: 500,\n        height: 300,\n        layout: {\n            type: 'border',\n            padding: 5\n        },\n        title: 'Hello Dialog',\n        items: [{\n            title: 'Navigation',\n            collapsible: true,\n            region: 'west',\n            width: 200,\n            html: 'Hello',\n            split: true\n        }, {\n            title: 'TabPanel',\n            region: 'center'\n        }]\n    });\n\n    window.show();\n})\n
\n\n

Step 2: Along the way, when you need better debugging ability, watch the console for warnings like these:

\n\n
[Ext.Loader] Synchronously loading 'Ext.window.Window'; consider adding Ext.require('Ext.window.Window') before your application's code ClassManager.js:432\n[Ext.Loader] Synchronously loading 'Ext.layout.container.Border'; consider adding Ext.require('Ext.layout.container.Border') before your application's code\n
\n\n

Simply copy and paste the suggested code above Ext.onReady, e.g.:

\n\n
Ext.require('Ext.window.Window');\nExt.require('Ext.layout.container.Border');\n\nExt.onReady(...);\n
\n\n

Everything should now load via asynchronous mode.

\n\n

Deployment

\n\n

It's important to note that dynamic loading should only be used during development on your local machines.\nDuring production, all dependencies should be combined into one single JavaScript file. Ext.Loader makes\nthe whole process of transitioning from / to between development / maintenance and production as easy as\npossible. Internally Ext.Loader.history maintains the list of all dependencies\nyour application needs in the exact loading sequence. It's as simple as concatenating all files in this\narray into one, then include it on top of your application.

\n\n

This process will be automated with Sencha Command, to be released and documented towards Ext JS 4 Final.

\n
Defined By

Config options

Appends current timestamp to script files to prevent caching. ...

Appends current timestamp to script files to prevent caching.

\n

Defaults to: true

The get parameter name for the cache buster's timestamp. ...

The get parameter name for the cache buster's timestamp.

\n

Defaults to: "_dc"

Whether or not to enable the dynamic dependency loading feature. ...

Whether or not to enable the dynamic dependency loading feature.

\n

Defaults to: false

The mapping from namespaces to file paths\n\n{\n 'Ext': '.', // This is set by default, Ext.layout.container.Containe...

The mapping from namespaces to file paths

\n\n
{\n    'Ext': '.', // This is set by default, Ext.layout.container.Container will be\n                // loaded from ./layout/Container.js\n\n    'My': './src/my_own_folder' // My.layout.Container will be loaded from\n                                // ./src/my_own_folder/layout/Container.js\n}\n
\n\n

Note that all relative paths are relative to the current HTML document.\nIf not being specified, for example, Other.awesome.Class\nwill simply be loaded from ./Other/awesome/Class.js

\n

Defaults to: {"Ext": "."}

Defined By

Properties

An array of class names to keep track of the dependency loading order. ...

An array of class names to keep track of the dependency loading order.\nThis is not guaranteed to be the same everytime due to the asynchronous nature of the Loader.

\n
Defined By

Methods

Explicitly exclude files from being loaded. ...

Explicitly exclude files from being loaded. Useful when used in conjunction with a broad include expression.\nCan be chained with more require and exclude methods, e.g.:

\n\n
Ext.exclude('Ext.data.*').require('*');\n\nExt.exclude('widget.button*').require('widget.*');\n
\n\n

Ext.exclude is alias for Ext.Loader.exclude for convenience.

\n

Parameters

Returns

  • Object

    object contains require method for chaining

    \n
Get the config value corresponding to the specified name. ...

Get the config value corresponding to the specified name.\nIf no name is given, will return the config object.

\n

Parameters

  • name : String

    The config property name

    \n

Returns

Translates a className to a file path by adding the the proper prefix and converting the .'s to /'s. ...

Translates a className to a file path by adding the the proper prefix and converting the .'s to /'s.\nFor example:

\n\n
Ext.Loader.setPath('My', '/path/to/My');\n\nalert(Ext.Loader.getPath('My.awesome.Class')); // alerts '/path/to/My/awesome/Class.js'\n
\n\n

Note that the deeper namespace levels, if explicitly set, are always resolved first. For example:

\n\n
Ext.Loader.setPath({\n    'My': '/path/to/lib',\n    'My.awesome': '/other/path/for/awesome/stuff',\n    'My.awesome.more': '/more/awesome/path'\n});\n\nalert(Ext.Loader.getPath('My.awesome.Class')); // alerts '/other/path/for/awesome/stuff/Class.js'\n\nalert(Ext.Loader.getPath('My.awesome.more.Class')); // alerts '/more/awesome/path/Class.js'\n\nalert(Ext.Loader.getPath('My.cool.Class')); // alerts '/path/to/lib/cool/Class.js'\n\nalert(Ext.Loader.getPath('Unknown.strange.Stuff')); // alerts 'Unknown/strange/Stuff.js'\n
\n

Parameters

Returns

Adds new listener to be executed when all required scripts are fully loaded. ...

Adds new listener to be executed when all required scripts are fully loaded.

\n

Parameters

  • fn : Function

    The function callback to be executed

    \n
  • scope : Object

    The execution scope (this) of the callback function

    \n
  • withDomReady : Boolean

    Whether or not to wait for document dom ready as well

    \n
( String/String[] expressions, [Function fn], [Object scope], [String/String[] excludes] )
Loads all classes by the given names and all their direct dependencies;\noptionally executes the given callback functi...

Loads all classes by the given names and all their direct dependencies;\noptionally executes the given callback function when finishes, within the optional scope.

\n\n

Ext.require is alias for Ext.Loader.require for convenience.

\n

Parameters

  • expressions : String/String[]

    Can either be a string or an array of string

    \n
  • fn : Function (optional)

    The callback function

    \n
  • scope : Object (optional)

    The execution scope (this) of the callback function

    \n
  • excludes : String/String[] (optional)

    Classes to be excluded, useful when being used with expressions

    \n
Set the configuration for the loader. ...

Set the configuration for the loader. This should be called right after ext-core.js\n(or ext-core-debug.js) is included in the page, e.g.:

\n\n
<script type=\"text/javascript\" src=\"ext-core-debug.js\"></script>\n<script type=\"text/javascript\">\n  Ext.Loader.setConfig({\n      enabled: true,\n      paths: {\n          'My': 'my_own_path'\n      }\n  });\n<script>\n<script type=\"text/javascript\">\n  Ext.require(...);\n\n  Ext.onReady(function() {\n      // application code here\n  });\n</script>\n
\n\n

Refer to config options of Ext.Loader for the list of possible properties.

\n

Parameters

  • name : String/Object

    Name of the value to override, or a config object to override multiple values.

    \n
  • value : Object (optional)

    The new value to set, needed if first parameter is String.

    \n

Returns

Sets the path of a namespace. ...

Sets the path of a namespace. For Example:

\n\n
Ext.Loader.setPath('Ext', '.');\n
\n

Parameters

Returns

( String/String[] expressions, [Function fn], [Object scope], [String/String[] excludes] )
Synchronously loads all classes by the given names and all their direct dependencies;\noptionally executes the given c...

Synchronously loads all classes by the given names and all their direct dependencies;\noptionally executes the given callback function when finishes, within the optional scope.

\n\n

Ext.syncRequire is alias for Ext.Loader.syncRequire for convenience.

\n

Parameters

  • expressions : String/String[]

    Can either be a string or an array of string

    \n
  • fn : Function (optional)

    The callback function

    \n
  • scope : Object (optional)

    The execution scope (this) of the callback function

    \n
  • excludes : String/String[] (optional)

    Classes to be excluded, useful when being used with expressions

    \n
","allMixins":[],"meta":{"author":["Jacky Nguyen "],"docauthor":["Jacky Nguyen "]},"requires":[],"deprecated":null,"extends":null,"inheritable":false,"static":false,"superclasses":[],"singleton":true,"code_type":"nop","alias":null,"statics":{"property":[],"css_var":[],"css_mixin":[],"cfg":[],"method":[],"event":[]},"subclasses":[],"uses":[],"protected":false,"mixins":[],"members":{"property":[{"tagname":"property","deprecated":null,"static":false,"owner":"Ext.Loader","template":null,"required":null,"protected":false,"name":"history","id":"property-history"}],"css_var":[],"css_mixin":[],"cfg":[{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.Loader","template":null,"required":false,"protected":false,"name":"disableCaching","id":"cfg-disableCaching"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.Loader","template":null,"required":false,"protected":false,"name":"disableCachingParam","id":"cfg-disableCachingParam"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.Loader","template":null,"required":false,"protected":false,"name":"enabled","id":"cfg-enabled"},{"tagname":"cfg","deprecated":null,"static":false,"owner":"Ext.Loader","template":null,"required":false,"protected":false,"name":"paths","id":"cfg-paths"}],"method":[{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Loader","template":false,"required":null,"protected":false,"name":"exclude","id":"method-exclude"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Loader","template":false,"required":null,"protected":false,"name":"getConfig","id":"method-getConfig"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Loader","template":false,"required":null,"protected":false,"name":"getPath","id":"method-getPath"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Loader","template":false,"required":null,"protected":false,"name":"onReady","id":"method-onReady"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Loader","template":false,"required":null,"protected":false,"name":"require","id":"method-require"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Loader","template":false,"required":null,"protected":false,"name":"setConfig","id":"method-setConfig"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Loader","template":false,"required":null,"protected":false,"name":"setPath","id":"method-setPath"},{"tagname":"method","deprecated":null,"static":false,"owner":"Ext.Loader","template":false,"required":null,"protected":false,"name":"syncRequire","id":"method-syncRequire"}],"event":[]},"private":false,"component":false,"name":"Ext.Loader","alternateClassNames":[],"id":"class-Ext.Loader","mixedInto":[],"xtypes":{},"files":[{"href":"Loader.html#Ext-Loader","filename":"Loader.js"}]}); \ No newline at end of file