0
我使用Ext.extend方法扩展了几个ExtJS组件(Window,DataView等)。我想添加一些额外的属性扩展。我如何将这些添加到我的组件?Custom ExtJs组件的自定义属性
ExWindow = Ext.extend(Ext.Window,{
border:false,
initComponent: function() {
// Component Configuration...
var config = {
height: 500,
width: 500,
items: [{
xtype: 'simplepanel'
}]
};
Ext.apply(this, Ext.apply(this.initialConfig, config));
ExWindow.superclass.initComponent.apply(this, arguments);
},
onRender:function() {
ExWindow.superclass.onRender.apply(this, arguments);
}
});
除非你打算在其中包含一些代码,否则不需要包含onRender的覆盖。 – 2010-12-06 08:05:37