[CLOSED] BaseParams and WriteBaseParams equivalent in 2.x

  1. #1

    [CLOSED] BaseParams and WriteBaseParams equivalent in 2.x

    Hi,

    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?

    Thanks!
    Last edited by Daniil; Oct 14, 2014 at 10:57 AM. Reason: [CLOSED]
  2. #2
    Hi Anup,

    This is supposed to help:
    <ext:Store runat="server">
        <Parameters>
            <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" />
            ...
        </Parameters>
    </ext:Store>
    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.
  3. #3
    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!
  4. #4
    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.
  5. #5
    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.

Similar Threads

  1. [CLOSED] Equivalent for css class in ie8-9
    By ViDom in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 05, 2012, 1:33 PM
  2. baseParams in extjs4
    By yash.kapoor in forum 2.x Help
    Replies: 4
    Last Post: Nov 16, 2012, 3:49 AM
  3. [CLOSED] Equivalent of savemask in ext.net 2.1
    By Daly_AF in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 07, 2012, 12:52 PM
  4. [CLOSED] 'div' equivalent in ext.net?
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 06, 2011, 6:03 PM
  5. HttpWriteProxy and WriteBaseParams not working
    By niceguymattx in forum 1.x Help
    Replies: 5
    Last Post: Oct 08, 2010, 2:45 PM

Posting Permissions