View Full Version : How can I commit my store's changes during one session?

27 Oct 2007, 3:03 AM
The docs state say, Ext.data.Store.commitChanges() is supposed to commit changes. But -in case of JSon- it does not send the changes to the server nor -in case of XML- does it save a new XML document. That is obviously caused by the fact that the underlying proxy can only load and not save/submit changes. commitChanges() only seems to mark all records as un-edited.

What is the smartest way to notify the server about changes that have been made? Take all records that have been edited... and then?

Let's say, I'm using JSon - is there any way that automatically wraps all those records into JSon-format, so I can just send it to the server?

After submitting, I suppose, I'll use commitChanges() or force the user to correct his input (alternatively just reject the changes), depending on what the server tells me.

27 Oct 2007, 3:35 AM
I guess I found all the answers that I need:

Store is a readonly-representation of remote data (http://extjs.com/forum/showthread.php?t=16070)

And Ext.util.JSon delivers the tools that I need when working with JSon.