Namespace Archetype
Defined in: archetype.js.
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
Archetype.defaultMethodBuilders
Default Method Builders, activated for all components
|
| <static> |
Archetype.defaultModules
Modules loaded when environnement is ok
|
| <static> |
Archetype.extensions
Configure the known extensions of Archetype.
|
| <static> |
Archetype.logger
Default logger for the whole application
|
| <static> |
Archetype.methodBuilders
|
| <static> |
Archetype.modules
Describes paths to : modules, subModules and dependencies (only required if not "natural")
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
Archetype.addCSS(file, onloadFunc)
Add a CSS in the header.
|
| <static> |
Archetype.addJS(file, onloadFunc, defer)
Add a script file to the header.
|
|
equals(otherUMN)
|
|
|
evaluate(object)
This method is very special.
|
|
| <static> |
Archetype.getUniqueModuleName(module, evaluation)
Return the UMN for the module string in parameter.
|
| <static> |
Archetype.i18n(templateString)
|
|
initialize(template, pattern, loopPattern, conditionPattern, commentsPattern)
|
|
| <static> |
Archetype.isLoadedModule(module)
Check if the module is already loaded
|
| <static> |
Archetype.launchPage(url)
Launch the main() of a "Page".
|
| <static> |
Archetype.require(module, options)
/!\Can't be used before the bootstrap.
|
| <static> |
Archetype.requireComponent(module, callback)
/!\Can't be used before the bootstrap.
|
| <static> |
Archetype.UniqueModuleName()
|
| <static> |
Archetype.useLogger(logger)
|
Field Detail
<static>
Archetype.defaultMethodBuilders
Default Method Builders, activated for all components
Defined in: archetype.conf.js.
Defined in: archetype.conf.js.
<static>
Archetype.defaultModules
Modules loaded when environnement is ok
Defined in: archetype.conf.js.
Defined in: archetype.conf.js.
<static>
Archetype.extensions
Configure the known extensions of Archetype.
It's used in the interpretation of ajax/library or other dynamic load
Defined in: archetype.conf.js.
Defined in: archetype.conf.js.
<static>
Archetype.logger
Default logger for the whole application
Defined in: archetype.conf.js.
Defined in: archetype.conf.js.
<static>
Archetype.methodBuilders
Defined in: componentManager.js.
<static>
Archetype.modules
Describes paths to : modules, subModules and dependencies (only required if not "natural")
Defined in: archetype.conf.js.
Defined in: archetype.conf.js.
Method Detail
<static>
Archetype.addCSS(file, onloadFunc)
Add a CSS in the header.
- Parameters:
- {Object} file
- {Function} onloadFunc
<static>
Archetype.addJS(file, onloadFunc, defer)
Add a script file to the header.
Should not be used by user.
- Parameters:
- {String} file
- {Function} onloadFunc
- {Boolean} defer Optional
equals(otherUMN)
- Parameters:
- otherUMN
evaluate(object)
This method is very special. "eval" function is used everywhere in order to always put the stack environment exactly like params are set
But we don't know which params label are used so local variables can be overriden.
Conclusion, all working variables are used like object variable ("this" is protected) for beeing sure there are any overriden
Defined in: template.js.
Defined in: template.js.
- Parameters:
- object
<static>
Archetype.getUniqueModuleName(module, evaluation)
Return the UMN for the module string in parameter.
If the module parameter is already an UMN, just return it.
- Parameters:
- {StringorUniqueModuleName} module
- {String} evaluation
- Evaluation tag for interpretation of the module
<static>
Archetype.i18n(templateString)
- Parameters:
- templateString
initialize(template, pattern, loopPattern, conditionPattern, commentsPattern)
Defined in: template.js.
- Parameters:
- template
- pattern
- loopPattern
- conditionPattern
- commentsPattern
<static>
Archetype.isLoadedModule(module)
Check if the module is already loaded
- Parameters:
- {StringorUniqueModuleName} module
<static>
Archetype.launchPage(url)
Launch the main() of a "Page". The JS is loaded asynchronously.
- Parameters:
- {String} url
<static>
Archetype.require(module, options)
/!\Can't be used before the bootstrap.
Tells archetype that you need a particular module.
- Parameters:
- {StringorArray} module
- : module's name or url
- {Hashmap} options
- options as follow : {Boolean} evaluation by default, eval is evaluated by the file extension of the module (js = true, other = false) true, url loaded is evaluated {Boolean} asynchronous by default : true true, request is perform asynchronous and call the callback "callback" whith the result false, request is synchronous and the return of the function contain the result {Function} callback callback used when in asynchronous mode {HashMap} storing indicate an Hashmap for storing XHR results.
<static>
Archetype.requireComponent(module, callback)
/!\Can't be used before the bootstrap.
Archetype.require alias to load easily a component asynchronously
Archetype.requireComponent("my.components.first");
todo : example Archetype.requireComponent("my.components.first", 1, "hello, world", ["foo","bar"]);
- Parameters:
- {String} module
- component module name
- {FunctionorArguments} callback Optional
- function to call when component is loaded. If callback is undefined, this will instanciate a new component with default constructor, (if you put anything else) as callback
- Exceptions:
- {String}
- Exception if no module has been defined
<static>
Archetype.UniqueModuleName()
<static>
Archetype.useLogger(logger)
- Parameters:
- {String} logger
- module name Instanciate a Logger by it's module name. In order to be instanciated, a logger class must have the same name as the module name without the "log." prefix