Results 1 to 6 of 6

Thread: Close and reopen TAB not working!

  1. #1
    Ext User
    Join Date
    Aug 2008
    Posts
    11
    Vote Rating
    0
      0  

    Default 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
    Sydney
    Posts
    521
    Vote Rating
    5
      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,615
    Vote Rating
    55
      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
      0  

    Default 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
      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
    549
    Vote Rating
    54
      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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •