1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    11
    Vote Rating
    0
    groyk is on a distinguished road

      0  

    Default Close and reopen TAB not working!

    Close and reopen TAB not working!


    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

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

    It is working with other types of content!!

  2. #2
    Ext JS Premium Member saJoshua's Avatar
    Join Date
    Nov 2007
    Location
    South Africa
    Posts
    521
    Vote Rating
    5
    saJoshua is on a distinguished road

      0  

    Default


    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.

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,498
    Vote Rating
    46
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by groyk View Post
    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

    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.

  4. #4
    Ext User
    Join Date
    Aug 2008
    Posts
    11
    Vote Rating
    0
    groyk is on a distinguished road

      0  

    Default Got it

    Got it


    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.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    5
    Vote Rating
    0
    puspabs is on a distinguished road

      0  

    Default


    Quote Originally Posted by groyk View Post
    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???

  6. #6
    Sencha User
    Join Date
    Jan 2011
    Posts
    544
    Vote Rating
    52
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    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