我有两种形式,我希望将其作为extraParams传递给我的网格存储代理,我只是不知道正确的语法
this.getMyGrid().getStore().getProxy().extraParams = this.getForm1().getValues;
我如何将this.getForm2()。getValues()添加到上面的代码中?
THX
答案 0 :(得分:1)
使用Ext.apply(object,config,[defaults]),这会将config的所有属性复制到指定的对象。最好在使用前检查对象的属性。
var me = this,
formValues = me.getForm1().getValues(),
store = me.getMyGrid().getStore();
if (formValues && store)
{
Ext.apply(store.getProxy().extraParams, formValues);
}