Sencha Documentation

Config Options

 
Will automatically set up the application to work in full screen mode by calling Ext.Viewport.init if true (defaults ...
Will automatically set up the application to work in full screen mode by calling Ext.Viewport.init if true (defaults to true)
 
If true, automatically calls Ext.Component.setProfile on all components whenever a application/device profile change ...
If true, automatically calls Ext.Component.setProfile on all components whenever a application/device profile change is detected (defaults to true)
 
defaultUrl : String
When the app is first loaded, this url will be redirected to. Defaults to undefined
When the app is first loaded, this url will be redirected to. Defaults to undefined
 
The number of milliseconds the load mask takes to fade out. Defaults to 1000
The number of milliseconds the load mask takes to fade out. Defaults to 1000
 
The number of milliseconds until the load mask is removed after starting the fadeout. Defaults to 1050.
The number of milliseconds until the load mask is removed after starting the fadeout. Defaults to 1050.
 
name : String
The name of the Application. This should be the same as the single global variable that the application uses, and sho...
The name of the Application. This should be the same as the single global variable that the application uses, and should not contain spaces
 
profiles : Object
A set of named profile specifications that this application supports. See the intro docs for an example
A set of named profile specifications that this application supports. See the intro docs for an example
 
scope : Object
The scope to execute the launch function in. Defaults to the Application instance.
The scope to execute the launch function in. Defaults to the Application instance.
 
If true, determines the current application profile on launch and calls updateComponentProfiles. Defaults to true
If true, determines the current application profile on launch and calls updateComponentProfiles. Defaults to true
 
useHistory : Boolean
True to automatically set up Ext.History support (defaults to true)
True to automatically set up Ext.History support (defaults to true)
 
useLoadMask : Boolean/String
True to automatically remove an application loading mask when the DOM is ready. If set to true, this expects a div ca...
True to automatically remove an application loading mask when the DOM is ready. If set to true, this expects a div called "loading-mask" to be present in the body. Pass the id of some other DOM node if using a custom loading mask element. Defaults to false.

Methods

 
determineProfile( Boolean silent ) : Void
Calls each configured profile function, marking the first one that returns true as the current application profile. F...
Calls each configured profile function, marking the first one that returns true as the current application profile. Fires the 'beforeprofilechange' and 'profilechange' events if the profile has changed

Parameters

  • silent : Boolean
    If true, the events profilechange event is not fired

Returns

  • Void
 
dispatch( Object options ) : Boolean
Dispatches to a given controller/action combo with optional arguments.
Dispatches to a given controller/action combo with optional arguments.

Parameters

  • options : Object
    Object containing strings referencing the controller and action to dispatch to, plus optional args array

Returns

  • Boolean   True if the controller and action were found and dispatched to, false otherwise
 
getProfile : String
Gets the name of the currently-detected application profile
Gets the name of the currently-detected application profile
 
launch( String profile ) : Boolean
Called automatically when the page has completely loaded. This is an empty function that should be overridden by each...
Called automatically when the page has completely loaded. This is an empty function that should be overridden by each application that needs to take action on page load

Parameters

Returns

  • Boolean   By default, the Application will dispatch to the configured startup controller and action immediately after running the launch function. Return false to prevent this behavior.

Events

 
beforeprofilechange( String profile, String oldProfile )
Fires when a change in Application profile has been detected, but before any action is taken to update the applicatio...
Fires when a change in Application profile has been detected, but before any action is taken to update the application's components about the change. Return false from any listener to cancel the automatic updating of application components (see autoUpdateComponentProfiles)

Parameters

  • profile : String
    The name of the new profile
  • oldProfile : String
    The name of the old profile (may be undefined)

Returns

  • Void
 
launch( Ext.Application app )
Fires when the application is launched
Fires when the application is launched

Parameters

  • app : Ext.Application
    The Application instance

Returns

  • Void
 
profilechange( String profile, String oldProfile )
Fires when a change in Applicatino profile has been detected and the application's components have already been infor...
Fires when a change in Applicatino profile has been detected and the application's components have already been informed. Listeners can perform additional processing here if required

Parameters

  • profile : String
    The name of the new profile
  • oldProfile : String
    The name of the old profile (may be undefined)

Returns

  • Void