I have a checkbox that triggers a function that opens a small window with a grid and a form.
If closeAction:'close' the window is not reopened after closing (some error).
If closeAction:'hide' the window is reopened with a mess instead of its items.
I know that I can solve the problem by id:Ext.id() though I have other functions that are using the id’s.
Is there a way to reopen the window without these problems?
Part of the function creating the window, nothing unusual:
var errWindow = new Ext.Window({
width:300,
title:headerStr,
closeAction:'hide',
items: [errForm,problemsGrid]
});
errWindow.show();
The items of the form have id’s like: “textfieldNumber1”. Without the id’s everithing works fine, but with them I get this
If you use
closeAction: 'close'which is the default, then the window cannot be reopened withshow(). If you use usecloseAction: 'hide'then the window can be shown and hidden but you must do this withhide()andshow()calls. A call toclose()will destroy the window regardless of whatcloseActionis set to.