I created 2 panels similar to this ExtJS structure (I know this is not the best way):
var panel = Ext.create("Ext.panel.Panel", { title: "first panel", width: 400, height: 250, renderTo: Ext.getBody(), html: "test 1" }); panel = Ext.create("Ext.panel.Panel", { title: "second panel", width: 400, height: 250, renderTo: Ext.getBody(), html: "test 2" });
Now I have 2 panels in my browser. And now, if I do this:
panel.destroy();
He destroys only the last. So my question is: how can I destroy the first panel? Is there a method that contains all panels in a browser? Do I keep identifier panels every time to destroy them later? ...
source share