Class Index | File Index

Classes


Class M.Application


Extends M.Object.
The root class for an application.
Defined in: application.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
This property contains the application-specific configurations.
 
The application's current language.
 
The application's default / fallback language.
 
This property can be used to define the application's entry page.
 
This property is set to NO once the first page within an application was loaded.
 
The application's name.
 
The type of this object.
Method Summary
Method Attributes Method Name and Description
 
design(obj)
This method encapsulates the 'include' method of M.Object for better reading of code syntax.
 
getConfig(key)
 
main()
The application's main-method, that is called automatically on load of the app.
Methods borrowed from class M.Object:
bindToCaller, create, destroy, extend, get, include, set
Class Detail
M.Application()
Field Detail
config
This property contains the application-specific configurations. It is automatically set by Espresso during the init process of an application. To access these properties within the application, use the getConfig() method of M.Application.

{String} currentLanguage
The application's current language.

{String} defaultLanguage
The application's default / fallback language.

{String} entryPage
This property can be used to define the application's entry page. If set, this page will be the first to be displayed if your application is started. Even if this property is not absolutely necessary, we highly recommend to specify an entry page!

{Boolean} isFirstLoad
This property is set to NO once the first page within an application was loaded. So this can be used as a hook to trigger some actions at the first load of any view. To do initial things for a specific view, use the isFirstLoad property of M.PageView.

{String} name
The application's name.

{String} type
The type of this object.
Method Detail
design(obj)
This method encapsulates the 'include' method of M.Object for better reading of code syntax. Basically it integrates the defined pages within the application into M.Application and sets some basic configuration properties, e.g. the default language.
Parameters:
{Object} obj
The mixed in object for the extend call.

{String} getConfig(key)
Parameters:
{String} key
The key of the configuration value to want to retrieve.
Returns:
{String} The value in the application's config object with the key 'key'.

main()
The application's main-method, that is called automatically on load of the app. Inside this method the rendering is initiated and all pages are bound to the 'pageshow' event so one can do some action whenever a page is loaded.

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Jan 25 2012 20:41:09 GMT+0100 (MEZ)