如何extend可以附带参数的控件【combobox】??

[quote]现在项目里有这样定义继承的控件,这个是不需要带参数的用法,直接查出所有的列表[/quote]
[code="java"]

Ext.app.Module = function(config){
Ext.apply(this, config);
Ext.app.Module.superclass.constructor.call(this);
this.init();
}
//---------
Modules.CreatedUserCombo = Ext.extend(Ext.form.ComboBox,{
store:new Ext.data.JsonStore({
url:'xx.do?format=json',
root:'data.accountList',
fields:['userName']
}),
fieldLabel:'Created User',
displayField:'userName',
valueField:'userName',
triggerAction:'all'
});
Ext.reg('createduser',Modules.CreatedUserCombo);
[/code]
[quote]然后就可以这样使用自定义控件了:[/quote]
[code="java"]
{
xtype : 'createduser',
name : 'createdUser'
}
[/code]
[quote]现在我希望能够使用自带参数,并将参数传递给jsonStore,然后向如下一样使用:[/quote]
[code="java"]
{
xtype : 'createduser',
name : 'createdUser',
baseParams : {customer: id}
}
[/code]
[quote]请问各位高手,该如何定义和使用呢?[/quote]
[b]问题补充:[/b]
[quote]还是不行啊,是不是传值传早了或者传晚了?不知道EXT底层的到底怎么extend的啊。。。[/quote]
[code="java"]Modules.CreatedUserCombo = Ext.extend(Ext.form.ComboBox,{

store:new Ext.data.JsonStore({

url:'xx.do?format=json',

root:'data.accountList',

fields:['userName'],
baseParams: this.baseParams||{},//这样还是显示不了
// baseParams: {customer: '8861008555'}, //这样可以成功
autoLoad : true

}),

fieldLabel:'Created User',

displayField:'userName',

valueField:'userName',

triggerAction:'all'

}); [/code]

[code="java"]

Ext.app.Module = function(config){
Ext.apply(this, config);
Ext.app.Module.superclass.constructor.call(this);
this.init();
}
//---------
Modules.CreatedUserCombo = Ext.extend(Ext.form.ComboBox,{
//在组件初始化期间调用的代码
initComponent: function(config){
//调用父类构造函数(必须)
Modules.CreatedUserComb.superclass.initComponent.apply(this,arguments);
//调用父类代码之后.如:设置事件处理和渲染组件
Ext.apply(this,{
store:new Ext.data.JsonStore({
url:'xx.do?format=json',
root:'data.accountList',
fields:['userName']
baseParams: config.baseParams||{}
})
})

  //或者:
  //this.store = new Ext.data.JsonStore({
  //  url:'xx.do?format=json',
  //  root:'data.accountList',
  //  fields:['userName']
  //  baseParams: this.baseParams||{}
  //})
},
fieldLabel:'Created User',
displayField:'userName',
valueField:'userName',
triggerAction:'all'

});
Ext.reg('createduser',Modules.CreatedUserCombo);

[/code]

[code="java"]

Ext.app.Module = function(config){
Ext.apply(this, config);
Ext.app.Module.superclass.constructor.call(this);
this.init();
}
//---------
Modules.CreatedUserCombo = Ext.extend(Ext.form.ComboBox,{
store:new Ext.data.JsonStore({
url:'xx.do?format=json',
root:'data.accountList',
fields:['userName']
//这一句
baseParams: this.baseParams||{}
}),
fieldLabel:'Created User',
displayField:'userName',
valueField:'userName',
triggerAction:'all'
});
Ext.reg('createduser',Modules.CreatedUserCombo);

[/code]