2012-06-11 92 views
0

在EXTJS DirectStore中,我想設置參數值,然後重新加載它。怎麼做 ?ExtJS DirectStore設置參數值

var myStore = new Ext.data.DirectStore({ 
      directFn: Report.ReadReport, 
      autoLoad: false, 
      paramsAsHash: false, 
      paramOrder: 'identifier', 
      root: 'Report', 
      totalProperty: 'total', 
      fields: [ 
       { name: 'name', type: 'string' } 
       ], 
      remoteSort: true, 
      listeners: { 
       load: function (store, recs, opt) { 
        myGrid.setHeight(400); 
        myGrid.doLayout(); 
       } 
      } 
     }); 

我想是這樣的

myStore.param.'identifier'.value = '12345' 
myStore.load(); 

怎麼辦呢?可能嗎 ?

感謝

回答

1
myStore.load({ 
    params: { 
     identifier: 12345 
    } 
});