How can I change/add params on a store

后端 未结 4 652
萌比男神i
萌比男神i 2020-12-28 23:11

On a sencha-touch, here\'s is my store declaration

Ext.regStore(\'newsStore\',  {
    model: \'News\',
    autoLoad: true,
    proxy: {
        type: \'ajax\         


        
4条回答
  •  不思量自难忘°
    2020-12-28 23:52

    I suggest you a more elegant solution, the Sencha way to do that:

    //Take your store
    var store = Ext.StoreMgr.get('YOUR_STORE_ID');
    
    //Apply the params
    Ext.apply(store.getProxy().extraParams, {
        partyID: options.partyID,
        eventName: options.eventName
    });
    
    //Reload your store
    store.contactInfoId.read();
    

    Hope this helps.

提交回复
热议问题