PDA

View Full Version : How to handle paignation in case of server API failure.



chandanmahajan
6 Jan 2011, 1:43 AM
Hi,

For paging, we need to have data in the following format.
{ "success": true, "results": 2000,
"rows": [ // *Note: this must be an Array
{ "id": 1, "name": "Bill", "occupation": "Gardener" }, { "id": 2, "name": "Ben", "occupation": "Horticulturalist" }, ... { "id": 25, "name": "Sue", "occupation": "Botanist" } ]

Can anybody please let me know how success property is handled? Can we make property to show any custom error message? Also how should we handled pagination in case of server API failure?


Thanks in advance,

Regards,
chandan

6 Jan 2011, 3:13 PM
In your case, I would setup a exception handler for the data store.

chandanmahajan
7 Jan 2011, 6:24 AM
Hey thanks,

I am working on it and will get back to you shortly.