PDA

View Full Version : Posting additional parameters with create, update and destroy.



Stju
29 Aug 2009, 2:07 PM
HI!
How can additional parameters be sent together with update, create and destroy in DirectStore?
Stju

crp_spaeth
31 Aug 2009, 11:17 PM
In the current SVN Head the structure of those CRUD requests had changed.
As far as I can tell, the requests do all look like the load Request.

the data propertie of an update looks like that:


{
baseparam1 : 'testparam',
anotherparam : 'another param attached to the stores params',
rows : [{ .. the record to update .. }]
}


So You have to extract the record(s) from the root propertie of the store instead of the root of the data param. But this makes it possible to access the params from the store in C-U-D requests also.

r3ap3r
29 Sep 2009, 10:41 PM
crp_spaeth,
Can you please clarify this a little more for me. I need to send additional parameters to the server when my DirectProxy destroy request is sent. Currently (using ExtJS 3.0.0) the destroy request only includes the ID of the record being destroyed in the 'data' property. At least I haven't been able to find any way of including any additional parameters, and looking at the source seems to indicate it isn't possible.

Are you saying that the latest SVN version will allow me to send additional parameters with the destroy request?

Thanks,
-Chris