PDA

View Full Version : Ext.data.Store update extension



receptor
12 Oct 2009, 6:56 AM
Hi,

i'd like to extend store with an 'update' method, which would work like 'load', except that it would not replace all records, but update modified fields in records, remove deleted records and add new ones.

I imagine i'd have to override saving/creating/removing records after they have been read by DataReader.

I see that store.load basically does it's work using execute('read', null, options).
I'm trying to understand what's going on in execute, and how to hook into it.

What would be the best way to do such an extension?
Any hints or examples would be greatly appreciated.