Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs将对象转换为组件_Extjs_Components_Extjs5 - Fatal编程技术网

Extjs将对象转换为组件

Extjs将对象转换为组件,extjs,components,extjs5,Extjs,Components,Extjs5,我有一个带有tbar的网格,其中有一个复选框作为项目: tbar: [ { boxLabel: 'field label', name: 'ShowEstimationConfilictsWhileReport', itemId: 'ShowEstimationConfilictsWhileReport', xtype: 'checkbox', }], initComponent: function () {

我有一个带有tbar的网格,其中有一个复选框作为项目:

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方法中发生的事情