AppML - Messages
Whenever AppML performs any action, it sends a signal via $application object to the controller. $application.message property describes the application state and we can act accordingly. For example:
function studentController($appml) {
if ($appml.message == "ready") {alert ("Application loaded.");}
}
Messages
Following are the kind of messages that AppML sends to controller.
| Sr.No. | Message & Description |
|---|---|
| 1 |
ready
When AppML is initialized and is ready to load data, then ready message is sent. |
| 2 |
loaded
When AppML is fully loaded and is ready to display data, then loaded message is sent. |
| 3 |
display
display message is sent before AppML is to display a data. |
| 4 |
done
When AppML displayed data, then done message is sent. |
AppML properties
Following is the list of important AppML properties.
| Sr.No. | Property & Description |
|---|---|
| 1 |
$appml.message − Represents the current state of AppML Application. |
| 2 |
$appml.display.name − Represents the name of the data item about to be displayed. |
| 3 |
$appml.display.value − Represents the value of the data item about to be displayed. |
| 4 |
$appml.error.number − Error number |
| 5 |
$appml.error.description − Error description |