GridPanel作为tabPanel的项
|
我在语法上是否知道此设置正确时遇到麻烦。从另一个线程,我知道将GridPanel添加到tabBar项,这在下面进行。在我的App.js中,我定义了一个从ExtJS示例(此处)复制的网格。
var grid = new Ext.grid.GridPanel({
// Details can be seen at
// http://dev.sencha.com/deploy/ext-3.4.0/docs/?class=Ext.Component?class=Ext.grid.GridPanel
});
在此之下,我创建了我的应用程序的实例:
appname.App = Ext.extend(Ext.TabPanel, {
fullscreen: true,
tabBar: {
ui: \'gray\',
dock: \'bottom\',
layout: { pack: \'center\' }
},
cardSwitchAnimation: false,
initComponent: function() {
if (navigator.onLine) {
// Add items to the tabPanel
this.items = [{
title: \'Tab 1\',
iconCls: \'tab1\',
xtype: \'tab1\',
pages: this.accountPages
}, {
title: \'Tab 2\',
iconCls: \'tab2\',
xtype: \'tab2\',
pages: this.accountPages
},
grid];
} else {
this.on(\'render\', function(){
this.el.mask(\'No internet connection.\');
}, this);
}
appname.App.superclass.initComponent.call(this);
}
});
该应用通常可以正常加载,但是加上grid
,它会崩溃并且没有任何加载。
从语法上讲,我是否应该在应用实例化内部定义网格,例如A)grid: ...
,B)this.grid = new ...
或C),因为我将其作为常规的var
命名为grid
?
非常感谢。
没有找到相关结果
已邀请:
1 个回复
了驳