rihaz
rihaz

Reputation: 1

Extjs Window not working after reopen

I am getting the error:

Uncaught TypeError: Cannot read property 'addCls' of null

for the following Scenario

I have created two desktop Icons with Its Window called Masters and Projects. By clicking Masters Icon It opens the master's window , after closing the master window It works fine when reopening it , But In case of projects window It opens the window for first time only, then I close the project's window, again I am trying to open It. It does not work until page refresh or reload.

I have used close action: 'hide' and close action: 'destroy'. But I am getting the same error.

Ext.override(Ext.Window, {
    closeAction: 'hide'
})

Please help me to do this Thanks in Advance.

Upvotes: 0

Views: 992

Answers (1)

Saki
Saki

Reputation: 5856

If the closeAction is hide, you must make sure that you create the window only once and that you keep a reference to the created window. Then you only call winRef.show(), not Ext.create.

Upvotes: 1

Related Questions