PDA

View Full Version : Close and reopen TAB not working!



groyk
4 Aug 2009, 1:07 AM
Hi EXT users

I've made a simple TAB layout, but when I load a grid into one of my tabs, close it and reopen it again. the grid is not loading. Why?

Link to exampel: http://www.multipumpen.mine.nu/mp/er...ut-browser.php (http://www.multipumpen.mine.nu/mp/erp/layout-browser.php)

Click at "Vare" in the left side, close the tab and now try to reopen!!

It is working with other types of content!!

saJoshua
4 Aug 2009, 1:26 AM
1. the URL that you posted requires a username and password.

2. Check that you are creating the grid each time you want to show it, if the tap you are closing is being destroyed it will also destroy the grid that it contains.

Animal
4 Aug 2009, 1:39 AM
Hi EXT users

I've made a simple TAB layout, but when I load a grid into one of my tabs, close it and reopen it again. the grid is not loading. Why?

Link to exampel: http://www.multipumpen.mine.nu/mp/er...ut-browser.php (http://www.multipumpen.mine.nu/mp/erp/layout-browser.php)

Click at "Vare" in the left side, close the tab and now try to reopen!!

It is working with other types of content!!

Read the docs on Container.remove which is what closing a tab does.

groyk
4 Aug 2009, 1:45 AM
Tank you saJoshua for the tip.

Now I understand, all variables for the tab is destroyed too.

Just wondering why some of the content loads without probs!

Anyway. Thank you for your fast reply.

puspabs
21 Sep 2012, 10:38 PM
Tank you saJoshua for the tip.

Now I understand, all variables for the tab is destroyed too.

Just wondering why some of the content loads without probs!

Anyway. Thank you for your fast reply.

what is the answer??? :(

willigogs
24 Sep 2012, 1:24 AM
If you destroy a parent container (i.e. a tab), then all child components (grids, attached stores, etc) will also be destroyed. You cannot then show something that no longer exists...

You will need to create new instances of these each time you create a new tab.

Here's an example:
http://examples.extjs.eu/dyntab.html