mobileservice
Last updated
Last updated
(plugins.mobileservice)
Type | Name | Summary |
---|---|---|
Create a descriptive model for offline data.
Returns: OfflineDataDescription OfflineDataDescription
Sample
Create a descriptive model for offline data.
Parameters
String prefix specified formname prefix used to retrieve row data from REST wise
Returns: OfflineDataDescription OfflineDataDescription
Sample
This should be called by inside the offline_data.ws_create method of a mobile service solution. That method is called by the the plugins.mobile.remoteSearch(foundset) that can be done on the mobile client. This will return a FoundSet that is in findmode with the exact same FindStates that the mobile client had when remoteSearch is called. On this FoundSet search() should be called and then this foundset should be added to a OfflineDataDescription.addFoundSet(fs) and that OfflineDataDescription object should be returned.
Parameters
Object data The data that is given into the offline_data.ws_create method
Returns: JSFoundSet The FoundSet that is in find mode or null if no FoundSet could be created.
Sample
This method returns the description of rows as a json array object.
Parameters
Returns: Object
Sample
If all the changes for a mobile client needs to come as once so that they can be in 1 transaction. Then the offline_data form should define a ws_update((data,version,authenticateResult)) method. This method will then get the complete data package which should be give to this function. This will redispatch all the inserts,updates or deletes to the various data forms that has the real rest methods to handle the actual insert. If something fails then an Exception will be thrown and you can do a rollback so that everything of this sync is reverted.
Parameters
Object data The data package that is given to the offline_data form ws_update method.
Number version The version number that is given to the offline_data form ws_update method.
Object authenticateResult The authenticateResult object that is given to the offline_data form ws_update method. (generated by the offline_data.ws_authenticate)
Returns: Object an object containing all the (key,value) pairs from the ws_create returned objects
Sample
Create a descriptive model for offline data.
Create a descriptive model for offline data.
This should be called by inside the offline_data.
This method returns the description of rows as a json array object.
If all the changes for a mobile client needs to come as once so that they can be in 1 transaction.