ウィンドウからFormPanelを削除したいという問題があります。
これがウィンドウにロードされている私のフォームです:
myForm = new Ext.FormPanel({
frame: true,
width: '100%',
id: 'myform',
layout: 'form',
autoHeight: true,
autoDestroy: false,
region: 'center',
monitorValid: true,
items: [{
xtype: 'textfield',
id: 'mytextfield',
fieldLabel: 'My Label',
}]
});
MyWindow = new Ext.Window({
title: 'MyWindow',
layout: 'auto',
resizable: false,
width: 717,
autoheight:true,
id:'mywindow',
closeAction:'hide',
closable: true,
items:[Ext.getCmp("myform")]
});
今、私はこのフォームを削除して別のフォームを表示する必要があります、そして私はどこか別の場所でこのようにしています:
MyWindow.removeAll();
MyWindow.add(Ext.getCmp("myAnotherForm"));
しかし、これにより"Uncaught TypeError: Cannot read property 'events' of undefined"
ext-all-debug.jsでエラーが発生します。
何かありますか、ここで行方不明ですか?
ありがとう。