View Full Version : Store Update following successful rest call

14 Jun 2012, 3:06 PM
What is the correct approach for updating store record following a successful rest update? The JSON
Has all the updated information from the server and I need to update my grid.

The success function has a record param...do I dig into the response and update the record param? Do I find the record in the store and update? This is for elements that are in my store and not on my form.


15 Jun 2012, 8:57 PM
You can use record.set(values) to update the record. You can of course call store.load() ;)


17 Jun 2012, 6:26 AM
> store.load() May be store.sync({success: sfun, failure: ffun}) with REST poxy?
.Store handles updates and following view event handling. No?

18 Jun 2012, 3:45 PM
I ended up using record.set(values) and then had to follow up with a commit to remove all the little red triangles.

20 Jun 2012, 2:21 PM
please mark this as an answered then.