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.
ready : When AppML is initialized and is ready to load data, then ready message is sent.
loaded : When AppML is fully loaded and is ready to display data, then loaded message is sent.
display : display message is sent before AppML is to display a data.
done : When AppML displayed data, then done message is sent.
AppML properties : Following is the list of important AppML properties.
$appml.message : Represents the current state of AppML Application.
$appml.display.name : Represents the name of the data item about to be displayed.
$appml.display.value : Represents the value of the data item about to be displayed.
$appml.error.number : Error number
$appml.error.description : Error description