0
我有几个组合框。我想干掉默认选项,所以我这样做了:为什么我不能在EXTJS中扩展组合框的默认选项?
var defaultComboOptions = {
displayField: 'name',
emptyText: 'Select a site...',
enableKeyEvents: true,
forceSelection: true,
listWidth: 300,
selectOnFocus: true,
triggerAction: 'all',
typeAhead: true,
typeAheadDelay: 125,
valueField: 'id',
width: 150,
xtype: 'combo'
};
var cbSites = new Ext.form.ComboBox(Ext.extend(defaultComboOptions, {
id:"myId",
x:200,
y:100,
listeners:{
}
}));
我只想在组合框的每个实例中放入不同的东西。
我可以在jQuery中做到这一点$.Extend(....
但我只是不了解ExtJS。
由于
工作很好。谢谢 – cbmeeks 2011-05-19 14:02:24