-
9 Nov 2012 1:33 AM #1
Answered: How to return server response on sync batchmode multiple records operations
Answered: How to return server response on sync batchmode multiple records operations
Can anyone explain (with example if possible) what response structure i have to return from php to client side if i want to receive all refreshed data to propagate new ids records, and to obtain each error message from each record that i have sended with sync ?
-------------------
Manel Juàrez
-
Best Answer Posted by vietits
1. For creating/updating requests, you should return something like this:
2. For deleting requests, you should return {"success": true} or {"success": false}Code:{ "success": true/false, "data": [...] // an array of updated or newly created records with ids }
-
9 Nov 2012 5:32 AM #2
1. For creating/updating requests, you should return something like this:
2. For deleting requests, you should return {"success": true} or {"success": false}Code:{ "success": true/false, "data": [...] // an array of updated or newly created records with ids }
-
9 Nov 2012 6:23 AM #3
thanks vietits, and for return one error message or correct message for each record ?
-------------------
Manel Juàrez
-
9 Nov 2012 3:39 PM #4
What I mentioned is for returning response for each request. It tells that request is successful or not but it does not tell which record is successful and which record is error. Maybe you should include this information in each returned record and handle it by yourself.
-
10 Nov 2012 9:23 AM #5
tome someone who could interest.
See also this link to an approach of commit records with succes: false return value in sync() method
http://www.sencha.com/forum/showthre...e-record-fails-------------------
Manel Juàrez


Reply With Quote