21 Apr 2008 9:09 AM #1
Recommended way to get EditorGridPanel to send changes back to the server?
I've got a great looking EditorGridPanel using a Store hooked up to JSONReader. I have a quaint little server app spitting out the correct JSON and everything is working beautifully. Now I want to start sending my changes back to the server and am wondering which way to proceed. ExtJS has been pleasantly plug and play so far, but I can't seem to find any simple way to get ExtJS to start sending changes back to the server.
The closest I've gotten on my own to an answer is in the description of Store.commitChanges:
To handle updates for changes, subscribe to the Store's "update" event, and perform updating when the third parameter is Ext.data.Record.COMMIT.
Thanks in advance,
21 Apr 2008 9:33 AM #2
Yes, everytime you want to 'commit' to the store, you're going to want to fire of an XHR.
My suggestion is to fire the XHR first, then fire the commit. This way when the XHR returns successful : true, then you know the db has been updated.
21 Apr 2008 9:34 AM #3
22 Apr 2008 12:26 PM #4