The event elements define actions that will run when certain app events occur. The list of events is provided via events property on the top level (form). Currenty, only one type of event is implemented: onchange (default).
This type of event will be fired when the field content/state changes. For example: in input fields, the event will be fired when the user changes the value and leaves the field (the focus changes by Tab or mouse-click).
The event element has the following properties:
Example of 2 event handlers
{
"text": "Form with events",
"events" : [
{
"field": "location",
"action": {
"method": "warehouseBalancesRF.get",
"params": { "eanNumber": "item", "location": "location" }
}
},
{
"field": "item",
"action": {
"method": "warehouseBalancesRF.get",
"params": { "eanNumber": "item", "location": "location" }
}
}
]
}
In this example, 2 event handlers have been specified. One for field location and one for item. So, if the user modifies value in one of the fields, warehouseBalancesRF.get method will be called.