PDA

View Full Version : Window doesn't Destory its Descendants on Close



yumusakg
18 Jan 2011, 10:45 PM
I have a window. you can see it in the link below. after close and open it, it doesn't reset the grid and its data. when close method of window is called, doesn't it destory all its descendant components?


http://www.flickr.com/photos/[email protected]/5368880287/

Condor
19 Jan 2011, 12:13 AM
Closing a window does destroy all the nested components, but a store isn't a component.

A store will only be destroyed by it's component if it's configured with autoDestroy:true.

yumusakg
19 Jan 2011, 12:51 AM
Condor,

very thanx for your reply. my problem is as you said to define the store as a global variable and with autoDestroy:false

so, i have created the store using factory pattern with autoDestroy:true. this solved my problem.