synchronize() |
It sends an update request with the modified data to the application service. This method is applicable for transaction models only.
Syntax
Script |
modelID.synchronize(bRefresh) |
Parameters
Parameter |
Description |
---|---|
bRefresh |
Takes boolean value. It denotes whether refresh of views will be done after synchronization.
|
Return Value
No value is returned.
Remarks
This method is for transactional models only.
Depending on the action by which this method is triggered, it fires events in the following order.
- xforms-onbeforesynchronize: Fired just before synchronizing data.
- xforms-onresponse: Fired when a response is received from the server.
- xforms-onsoapfault: Fired if a SOAP fault occurred.
- xforms-onsynchronized: Fired upon the successful synchronization (retrieval) of data with the server.
- xforms-ondatacompleted: Fired when the data is rendered or reverted (in case of a SOAP fault) successfully.
Applies to
Model, xforms-onbeforesynchronize, xforms-onresponse, xforms-onsoapfault, xforms-onsynchronized, xforms-ondatacompleted