PDA

View Full Version : Adding serverside validated / updated Items to Store (and Grid)



codeext
15 May 2013, 5:18 AM
Hi there,

i searched already for a solution but could not find nothing that would help me to solve my problem:

I have a store and my models.
I create new items using Modal Window which contains a form.panel.
The form contains not all fields of the model.
If i click on save i can update the model with the contents of the form.
Than i call store.add to add the newly created Record.

Server responses with success and inserts the Entity in the DB with additional fullfilled fields e.g primaryId, date created, creator etc. In the Response from stores create api there are all necessary field fullfilled. BUT the Grid inserts the model which was only updated by the form and is incomplete!

How should i handle this problem.

Another question would be , if the server anwsers success:false and sends additional info how can i mark fields in form that are invalid?

Thanks a lot for any help

Greets
codeext

mitchellsimoens
17 May 2013, 6:33 AM
What is the response you send back from the server?