I have my ExtJS 4.2.1 Application and Inside my view:
xtype: 'combobox',
itemId: 'cboEmployeeNumber',
width: 180,
store: Ext.create('App.store.employee.EmployeeCombo', {
// here I want to set extraParams maybe like
// proxy.extraParams:{ employerId:0}
}),
I can do that inside my controller:
onEmployeeBeforeQuery: function(queryPlan, eOpts) {
var me = this,
employerId = me.getEditRequest().down('#cboEmployer').getValue(),
store = me.getEditRequest().down('#cboEmployee').getStore()
store.getProxy().extraParams = {
employerId: employerId
};
},
But how can I do this in my view when creating the store?
Thanks.