创建扩展元素的新实例
Create new instance of extended element
我正在使用 extjs 3.4
我有一个元素:
App.Components.ComboBox = Ext.extend(Ext.form.ComboBox, {
constructor: function (config) {
config = Ext.apply({
triggerAction: 'all',
mode: 'local',
editable: true,
lastQuery: '',
forceSelection: true
}, config);
App.Components.ComboBox.superclass.constructor.call(this, config);
} //other methods ommited
});
Ext.reg('appcombo', App.Components.ComboBox);
我想动态创建这个元素并加载它的商店。
我知道我可以创建组合框:
var newCB = Ext.form.ComboBox(config);
但是如何创建 appcombo 类型的新元素?
类似于:
var myCustomComboBox = new App.Components.ComboBox({... your config ...});
或使用 xtype:
{
xtype: 'appcombo',
...
...
}
我正在使用 extjs 3.4
我有一个元素:
App.Components.ComboBox = Ext.extend(Ext.form.ComboBox, {
constructor: function (config) {
config = Ext.apply({
triggerAction: 'all',
mode: 'local',
editable: true,
lastQuery: '',
forceSelection: true
}, config);
App.Components.ComboBox.superclass.constructor.call(this, config);
} //other methods ommited
});
Ext.reg('appcombo', App.Components.ComboBox);
我想动态创建这个元素并加载它的商店。
我知道我可以创建组合框:
var newCB = Ext.form.ComboBox(config);
但是如何创建 appcombo 类型的新元素?
类似于:
var myCustomComboBox = new App.Components.ComboBox({... your config ...});
或使用 xtype:
{
xtype: 'appcombo',
...
...
}