構文的にこの設定が正しいかどうかを知るのに問題があります。別のスレッドから、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
ます。
どうもありがとう。