【发布时间】:2011-06-03 09:29:15
【问题描述】:
我有一个标签面板,到目前为止工作正常, 但是,一旦我将网格面板应用为选项卡之一,我就会在 Observerable.js(ext 的一个类)中的某个地方收到一个 js 错误,它说“item.on(...)”不是'项目未定义'后的函数
以下是相应的代码行:
这就是我在标签面板中所做的:
initComponent: function() {
this.items = [{
xtype: 'profileList',
title: 'Profiles'
}];
this.callParent(arguments);
}
这是我的网格面板的代码:
Ext.define('BC.view.profile.ProfileList', {
extend: 'Ext.grid.Panel',
alias: 'widget.profileList',
cls: 'profileList',
border: false,
initComponent: function(){
Ext.apply(this, {
store: 'Profiles',
columns: [{
text: 'Name',
dataIndex: 'name',
flex: 1,
}, {
text: 'Others',
dataIndex: 'otherUsers',
width: 200
}, {
text: 'Limit',
dataIndex: 'limit',
width: 200
}]
});
console.log('before');
this.callParent(arguments);
console.log('after');
}
});
感谢您的帮助!
编辑:第一个 console.log 有效,错误似乎发生在 'callParent()'
【问题讨论】:
标签: javascript extjs extjs4