View Full Version : Sending additional parameters during direct update operation

Roman Töngi
6 May 2014, 5:26 AM
I want to submit additional parameters during a direct update operation to the server. If I got access to the update operation, I could set the params property of the operation object.

So far, I did not manage to get a reference to the batch operations. I tried the edit event of the grid, the beforesync event of the store, but it did no work.

Any idea, how I can access batch operation objects right before they are processed so that I can add parameters beeing sent to the server?

Or is there a more convenient way to pass extra parameters? extraParams are only included in read operations.

Thanks a lot.

7 May 2014, 4:01 PM
Unfortunately, there's no way to do that presently. The record data to be updated is sent as an array, and if extraParams were sent along the server side would face a very ambiguous task of separating the actual data from extraParams. If the Ext.Direct client side supported out of band data passage that would be an option, but it does not presently and there is no plan to add such a feature at the moment.


Roman Töngi
7 May 2014, 9:20 PM
I know there's no official API method to do that, but there is sure to be a workaround by which I can access a corresponding object directly, isn't it?

I once managed it to access the operation object (I think it was the operation object) to add extra params in the edit event of the grid or the beforesync event of the store.

Now I cannot reconstruct it :-)


8 May 2014, 12:59 PM
That's what I'm saying: there's just no API for that, neither public nor private. With read operation, we're sending an object with metadata for the retrieval method; with write operations we're just sending an array of record objects to be created/updated/deleted, but no metadata fits in the array because it would be indistinguishable from the actual data. So no params are applied to the operation at all.

Having said that, if you really truly need to hack something in, you can override Ext.data.proxy.Direct.buildRequest() or doRequest().


Roman Töngi
8 May 2014, 9:22 PM
OK, thanks a lot.

Regards Roman