title: How to re-add a removed tab in extjs
body: <p>I want to add/remove a tab.</p>
  
  <p>I am aware of add/remove methods. But my issue is that I want to re-add the same tab, again. The re-added tab is stored in memory. I want to be able to do something like this:</p>
  
  <pre><code>function addMyTab(tab) {
      var me = this;
      if (!tab) { // use most recently added tab
          tab = me.tab;
      } else { // update most recently added tab
          me.tab = tab;
      }
  
      var tabPanel = Ext.ComponentQuery.query(..);
      tabPanel.removeAll();
      tabPanel.add(me.tab);
  }
  </code></pre>
  
  <p>This however doesnot work, it throws this error:</p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'addCls' of null</p>
  </blockquote>
  
  <p>An <a href="http://www.sencha.com/forum/showthread.php?192670-Problem-with-destroying-component" rel="nofollow">Extjs forum thread</a> suggest that this is due to trying to add an already destroyed element.</p>
  
  <p>How can re-use the tab?</p>