onResponseUpdateBefore
onResponseUpdateBefore
Called immediately before a normal request's response value is applied to the Data Set.
Parameters
dsName(string): The name of the Data Set being updatedprovInstName(string): The name of the Provider Instance that sent the response
Returns: No return value — this is a callback, so its return value isn't used.
Description
The moment just before the server response is actually written to the Data Set, and to the widgets bound to it. Use it to transform the value before it lands, or to log it.
Example
function onResponseUpdateBefore(dsName, provInstName) {
$log.i(dsName + " will update from " + provInstName);
}
Related
- The name resembles
onPushUpdateBefore, butonResponseUpdateBeforefires only for normal request responses (requestData/requestNextData); real-time subscription data callsonPushUpdateBeforeinstead. - The new value hasn't reached the Data Set at this point, so reading it returns the previous data.
- If the preceding
onCheckUpdateValidcalled$vm.setCancelData(provInstName, true), this event never fires and the update is cancelled outright.