View Full Version : [CLOSED] BaseParams and WriteBaseParams equivalent in 2.x

Oct 13, 2014, 4:45 PM

In Ext JS 4, it seems that the BaseParams is now in the Proxy as ExtraParams, which is fine.

However, a useful feature in Ext JS 3 was a differentiation between baseParams for read operations and writeBaseParams for parameters to pass during a write operation.

In my particular case I have a large number of extra parameters used for reading, whereas for writing I have very few, so I want to avoid sending the baseParams each time for an update when not needed.

I just wanted to double check I have not missed it, but it seems now if I want to maintain separate parameters for read and write for a store, I have to

- Manually remember the current extraParams to another variable, for example,
- Update the proxy's extraParams to be the ones needed for the write/update operation
- When operation completes, restore the original extraParams to carry on with reading etc.

Does that sound right to you? Or have I missed a feature somewhere?


Oct 13, 2014, 5:17 PM
Hi Anup,

This is supposed to help:

<ext:Store runat="server">
<ext:StoreParameter Name="someReadParameter" Value="some read parameter" Mode="Value" Action="Read" />
<ext:StoreParameter Name="someUpdateParameter" Value="some update parameter" Mode="Value" Action="Update" />
<ext:StoreParameter Name="someDestroyParameter" Value="some destroy parameter" Mode="Value" Action="Destroy" />

But it is somehow not working. I need to investigate.

Also an open question is how to set up the only parameter for any sync operation. I will check that also.

Oct 13, 2014, 5:28 PM
Thanks for that extra info. I have to go now unfortunately but your info made me look at the Ext.NET code a bit more (I was hunting around in the Ext JS docs only) and I saw this in AbstractStore:

list.Add("parametersProxy", new ConfigOption("parametersProxy", new SerializationOptions("readParameters", JsonMode.Raw), "", this.ParametersProxy ));
list.Add("syncParametersProxy", new ConfigOption("syncParametersProxy", new SerializationOptions("writeParameters", JsonMode.Raw), "", this.SyncParametersProxy ));

Are these the ones you are referring to, ultimately? Looks like ParametersProxy uses Parameters, and SyncParametersProxy uses SyncParameters, so if it works, I should be able to use those as yet another way, too?

I will carry on my own investigation tomorrow. Thanks!

Oct 13, 2014, 8:47 PM
Yes, exactly. Forgot about SyncParameters.

Parameters are used for read requests.

SyncParameters are use for sync requests. If a StoreParameter's Action is not specified, then a parameter goes to any sync request.

Oct 14, 2014, 9:47 AM
Thanks for confirming. I kept looking at the docs around proxy so was struggling to find what I needed initially. It seems these are what I need for now, so thanks. You can make this as closed.