AMI Web Framework API > Class > SubApp
ami.SubApp
The basic AMI sub-application
Implements: ami.ISubApp
Constructor
SubApp()
Methods
onReady(userdatanull) ->{$.Promise or $.Deferred or undefined}
Called when the sub-application is ready to run
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| userdata | * | the user data | ✓ |
Returns:
A JQuery promise object, deferred object or nothing
Type: $.Promise or $.Deferred or undefined
onExit(userdatanull) ->{$.Promise or $.Deferred or undefined}
Called when the sub-application is about to exit
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| userdata | * | the user data | ✓ |
Returns:
A JQuery promise object, deferred object or nothing
Type: $.Promise or $.Deferred or undefined
onLogin(userdatanull) ->{$.Promise or $.Deferred or undefined}
Called when logging in
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| userdata | * | the user data | ✓ |
Returns:
A JQuery promise object, deferred object or nothing
Type: $.Promise or $.Deferred or undefined
onLogout(userdatanull) ->{$.Promise or $.Deferred or undefined}
Called when logging out
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| userdata | * | the user data | ✓ |
Returns:
A JQuery promise object, deferred object or nothing
Type: $.Promise or $.Deferred or undefined
setupCtx(immutables, defaults, options) ->{Object.<string, *>}
Sets up the application's context
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| immutables | Object.<string, *> | dictionary of immutable parameters in the application's context | |||
| defaults | Object.<string, *> | dictionary of default values for optional parameters | |||
| options | Object.<string, *> | dictionary of values for optional parameters |
Returns:
The resulting application's context
Type: Object.<string, *>
createControl(parentnull, control, params, options) ->{$.Promise}
Asynchronously creates a control
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| parent | * | the parent entity | ✓ | ||
| control | string | the control name | |||
| params | Array.<*> | the control's parameters | |||
| options | Object.<string, *> | dictionary of optional parameters (context, cache) | {} | ✓ |
Returns:
A JQuery promise object
Type: $.Promise
createControlInBody(parentnull, control, controlParams, controlOptions, options) ->{$.Promise}
Asynchronously creates a control in the body
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| parent | * | the parent entity | ✓ | ||
| control | string | the control name | |||
| controlParams | Array.<*> | the control's render method mandatory parameters | |||
| controlOptions | Object.<string, *> | the control's render method optional parameters | |||
| options | Object.<string, *> | dictionary of optional parameters (context, cache) | {} | ✓ |
Returns:
A JQuery promise object
Type: $.Promise
createControlInContainer(parentnull, control, controlParams, controlOptions, icon, title, options) ->{$.Promise}
Asynchronously creates a control in a container
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| parent | * | the parent entity | ✓ | ||
| control | string | the control name | |||
| controlParams | Array.<*> | the control's render method mandatory parameters | |||
| controlOptions | Object.<string, *> | the control's render method optional parameters | |||
| icon | string | the icon | |||
| title | string | the title | |||
| options | Object.<string, *> | dictionary of optional parameters (context, cache) | {} | ✓ |
Returns:
A JQuery promise object
Type: $.Promise
createControlFromWebLink(parentnull, el, options) ->{$.Promise}
Asynchronously creates a control in a container from a WEB link
Parameters:
| Name | Type | Description | Default | Optional | Nullable |
|---|---|---|---|---|---|
| parent | * | the parent entity | ✓ | ||
| el | Element | the HTML element | |||
| options | Object.<string, *> | dictionary of optional parameters (context, cache) | {} | ✓ |
Returns:
A JQuery promise object
Type: $.Promise
- Prev
- Control
- Next
- The admin dashboard