Extjs将对象转换为组件
我有一个带有tbar的网格,其中有一个复选框作为项目:Extjs将对象转换为组件,extjs,components,extjs5,Extjs,Components,Extjs5,我有一个带有tbar的网格,其中有一个复选框作为项目: tbar: [ { boxLabel: 'field label', name: 'ShowEstimationConfilictsWhileReport', itemId: 'ShowEstimationConfilictsWhileReport', xtype: 'checkbox', }], initComponent: function () {
tbar: [ {
boxLabel: 'field label',
name: 'ShowEstimationConfilictsWhileReport',
itemId: 'ShowEstimationConfilictsWhileReport',
xtype: 'checkbox',
}],
initComponent: function () {
var me = this;
var myCheckbox = me.tbar[0]; //?? get object but i want checkbox extjs component
me.callParent();
}
在initComponent中,tbar[0]获取一个对象:
Object {
boxLabel: "filed label",
name: "ShowEstimationConfilictsWhileReport",
itemId: "ShowEstimationConfilictsWhileReport",
xtype: "checkbox"
}
如何将checkboxfield获取为extjs组件,或者如何将此对象转换为extjs组件。它将在this.callParent行之后转换为对象。将配置从对象转换为组件是initComponent方法中发生的事情