DelphiFAQ Home Search:
General :: Web publishing :: JavaScript :: ExtJS


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

Closing an extjs window closes / destroys components displayed in it

I found out that if you have a component that is displayed in a window,
and you close that window, then the component gets released (free'd, cleared, destroyed, you name it).

This makes sense if the component was created in the scope of the window,
but it is a bit of a surprise in a situation like below.

Then when you close the window referenced by (win), the grid referenced by (myglobalgrid) is destroyed.
If you run the window creating code a second time, you need to create the grid freshly as well.

I was quite surprised by that.

var myglobalgrid = new Grid({ .. });
 var win = new Window({
         items: [myglobalgrid]

Generated 4:01:47 on Oct 30, 2020