pp108 : synchronize()

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.

  • True: Refresh of views will be done after synchronization.
  • False: This is the default value. Refresh of views will not 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.

  1. xforms-onbeforesynchronize: Fired just before synchronizing data.
  2. xforms-onresponse: Fired when a response is received from the server.
  3. xforms-onsoapfault: Fired if a SOAP fault occurred.
  4. xforms-onsynchronized: Fired upon the successful synchronization (retrieval) of data with the server.
  5. 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