私はコードでactioncolumnのアイコンをクリックすることでExtJSの4でウィンドウを作成しています:ウィンドウcloseActionエラー
{
xtype:'actioncolumn',
width: 20,
items: [
{
tooltip: 'Log',
icon: '/img/details.gif',
handler: function(grid, rowIndex) {
var store = grid.getStore();
var record = store.getAt(rowIndex);
var ba = Ext.createByAlias('widget.ba');
ba.setTitle(ba.title + record.get('name'));
ba.down('grid').getStore().load({
params:{
id: record.get('id'),
},
});
ba.show();
},
},
]
},
私のウィンドウが "closeAction: '破棄'":あり
Ext.define('BB.view.Ba', {
extend: 'Ext.window.Window',
alias: 'widget.ba',
title: 'Log ',
layout: 'fit',
width: 500,
closeAction: 'destroy',
items: {
xtype: 'gridpanel',
store: 'Bas',
selType: 'rowmodel',
columns: [
{
dataIndex: 'order_id',
width: 60,
text: 'order id',
}, {
dataIndex: 'time',
width: 100,
text: 'time',
}, {
dataIndex: 'summ',
width: 80,
text: 'summ',
renderer: function(value) {
return value.toFixed(2);
},
}, {
dataIndex: 'comment',
width: 220,
text: 'comment',
},
],
//bbar: Ext.createByAlias('widget.paging'),
},
});
することができますようにウィンドウはエイリアス名 'widget.ba'によって呼び出されますを参照してください。
私が最初にactioncolumnアイコンをクリックすると、うまくいっていますが、ウィンドウを閉じると(ウィンドウの右上にある「十字」をクリックして)actioncolumnアイコンをもう一度クリックします。「Uncaught TypeError:コンソールログでプロパティ 'style' of undefinedを読み取れません。これは "ba.show();"にスローされます。スクリプトの行。ウィンドウは表示されませんが、アイコンウィンドウのレンダリングを他のクリックした後は実際にはウィンドウではなく、ビューポートへの単純なパネルとしてレンダリングされます。
なぜ "closeAction"が "破壊"に設定されている場合、そのような問題がありますか?
ありがとうございました。