PDA

View Full Version : JsonStore returned JSON for new records



Marioario
2 Aug 2010, 9:21 AM
Hello,

I have been searching around for some more detailed documentation on the JsonStore and unfortunately I have not been able to find what I am looking for. Ideally I would like to know how the JsonStore works in the scenario of submitting new results to the server.

Here's my unique situation:
1) I have users upload a file with user data
2) These users are added to the grid
3) On save, I send all creates as a batch to the server
4) The server attempts commit of each, one by one
5) The server returns:

a) an array of users who were successfully created, along with their IDs
b) an array of users who were not successfully created, with no IDs
What does the JsonStore do exactly to determine which of its records have been created successfully upon save? Ideally I would like to remove the dirty marks and add IDs to the successes and highlight the error lines so that the user can edit or remove them and resubmit.

Any code samples would be helpful!

Thanks in advance. This is a great support community.