3
創建項目我有一個像EXTJS 4.1 - 如何initComponent功能
var filterPanel = Ext.create('Ext.panel.Panel', {
bodyPadding: 5,
width: 300,
myValue:5,
title: 'Filters',
initComponent: function() {
this.items = [{
xtype: 'textfield',
value: this.myValue
}];
this.callParent();
}
renderTo: Ext.getBody()
});
我試圖創建一個項目都有xtype: 'textfield'
和值是面板的myValue
面板。但那是失敗的。
如何做到這一點謝謝。 這裏是我的示例文本http://jsfiddle.net/4Cmuk/