PDA

View Full Version : How Does Store determine create/update/delete/read upon save()?



hevole
29 Nov 2010, 10:26 AM
Hi All,

I am wondering how does the dataProxy determine whether its Store should call create/update/delete or read.

In the context of my problem, i used a store to keep the values of a editorGrid, which should support all CRUD functionalities.

The problem i am having now is that after deleting a record from the store, then calling store.save() does not invoke the url specified in store.proxy.api("destroy", ...), instead it does nothing; also that changing the value of any cell in the grid would not result in calling the update url, but the one for create.

Thanks for help.

mankz
29 Nov 2010, 11:15 AM
Guessing your idProperty is incorrectly set. Post your store code.

Condor
29 Nov 2010, 11:16 AM
Your reader hasn't been configured with a proper idProperty.

mankz
29 Nov 2010, 11:17 AM
@condor: too slow :) 1 minute

hevole
29 Nov 2010, 11:25 AM
@Condor, mankz: it turned out i did not set the idProperty for the reader. after following the suggestions it worked like wonder, thanks to both of you!