I have written an ExtJS 4.2.2 CRUD database application using a Store configured with an AJAX proxy and JSON Reader.
I would like to create several records in my database from one Store.sync call. However, I do not understand how the server should respond when some of the records can be created and some cannot. For example when attempting to create two records the server might respond as follows when both records are successfully created:
{
success: true,
users: [
{ id: 1, name: ‘Ed’ },
{ id: 2, name: ‘Tommy’}
]
}
But how should the server respond if one of the records can be created but the other cannot?
Thanks for any help.
I would like to create several records in my database from one Store.sync call. However, I do not understand how the server should respond when some of the records can be created and some cannot. For example when attempting to create two records the server might respond as follows when both records are successfully created:
{
success: true,
users: [
{ id: 1, name: ‘Ed’ },
{ id: 2, name: ‘Tommy’}
]
}
But how should the server respond if one of the records can be created but the other cannot?
Thanks for any help.
Aucun commentaire:
Enregistrer un commentaire