开发者

extjs dynamically add paramters to baseparams of store

开发者 https://www.devze.com 2023-02-10 04:55 出处:网络
i am trying to follow this example here :http://www.sencha.com/forum/showt开发者_JAVA技巧hread.php?11735-How-can-I-ADD-to-baseParams-rather-than-overwrite-one-set-of-baseParams-with-another

i am trying to follow this example here :http://www.sencha.com/forum/showt开发者_JAVA技巧hread.php?11735-How-can-I-ADD-to-baseParams-rather-than-overwrite-one-set-of-baseParams-with-another

The objective is to add parameters to your baseparams dynamically. But when I submit request, I cannot see the parametrs added. What am I missing?


Every class extending Ext.data.Store has a setBaseParam() method that can be used for that.

If your store is for example in variable called store you do

store.setBaseParam('someParameter','value');

Probably the most common usage is in grids

grid.getStore().setBaseParam('someParameter','value');

similarily in remote comboboxes

comboBox.getStore().setBaseParam('someParameter','value');


for ExtJS4 you should do

comboBox.getStore().getProxy().extraParams.someParam = 'someValue'

0

精彩评论

暂无评论...
验证码 换一张
取 消