<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: New Example &#8211; How To Dynamically Add Tabs To TabPanel</title>
	<atom:link href="http://blog.extjs.eu/examples/new-example-how-to-dynamically-add-tabs-to-tabpanel/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.extjs.eu/examples/new-example-how-to-dynamically-add-tabs-to-tabpanel/</link>
	<description>For good of all productive developers</description>
	<lastBuildDate>Sun, 05 Feb 2012 09:37:22 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: LeslieM</title>
		<link>http://blog.extjs.eu/examples/new-example-how-to-dynamically-add-tabs-to-tabpanel/comment-page-1/#comment-3683</link>
		<dc:creator>LeslieM</dc:creator>
		<pubDate>Mon, 01 Feb 2010 23:29:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.extjs.eu/?p=231#comment-3683</guid>
		<description>Correction!  Turns out my issues were all due to bugs in Ext 3.0.3.  Ext 3.1.0 works fine without requiring deferredRender : false.

There was a bug in my previous logic, too:

tpItem.title = &quot;RENAMED&quot;;
--&gt;
tpItem.setTitle(&quot;RENAMED&quot;);</description>
		<content:encoded><![CDATA[<p>Correction!  Turns out my issues were all due to bugs in Ext 3.0.3.  Ext 3.1.0 works fine without requiring deferredRender : false.</p>
<p>There was a bug in my previous logic, too:</p>
<p>tpItem.title = &#8220;RENAMED&#8221;;<br />
&#8211;&gt;<br />
tpItem.setTitle(&#8221;RENAMED&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LeslieM</title>
		<link>http://blog.extjs.eu/examples/new-example-how-to-dynamically-add-tabs-to-tabpanel/comment-page-1/#comment-3682</link>
		<dc:creator>LeslieM</dc:creator>
		<pubDate>Mon, 01 Feb 2010 18:42:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.extjs.eu/?p=231#comment-3682</guid>
		<description>I hoped that adding simple logic to rename or delete a tab would just work to extend this example.  However if you add logic to remove all tabs, then once new tabs are added back in they will show up but nothing will appear in the contents.  Also renaming a tab will not work.

The solution is to add deferredRender : false to the tabpanel config.

Test cases - add these to the toolbar:

{
text:&quot;Remove all tabs&quot;
,handler:function() {
 var tp = win.items.itemAt(0);
 var tab = tp.removeAll();
 }
and
{
text:&quot;Rename 2nd tab&quot;
,handler:function() {
 var tp = win.items.itemAt(0);
 var tpItem = tp.items.itemAt(1);
 alert(&quot;current title=&quot; + tpItem.title);
 tpItem.title = &quot;RENAMED&quot;;
 tp.doLayout(false,true);
 }</description>
		<content:encoded><![CDATA[<p>I hoped that adding simple logic to rename or delete a tab would just work to extend this example.  However if you add logic to remove all tabs, then once new tabs are added back in they will show up but nothing will appear in the contents.  Also renaming a tab will not work.</p>
<p>The solution is to add deferredRender : false to the tabpanel config.</p>
<p>Test cases &#8211; add these to the toolbar:</p>
<p>{<br />
text:&quot;Remove all tabs&quot;<br />
,handler:function() {<br />
 var tp = win.items.itemAt(0);<br />
 var tab = tp.removeAll();<br />
 }<br />
and<br />
{<br />
text:&quot;Rename 2nd tab&quot;<br />
,handler:function() {<br />
 var tp = win.items.itemAt(0);<br />
 var tpItem = tp.items.itemAt(1);<br />
 alert(&quot;current title=&quot; + tpItem.title);<br />
 tpItem.title = &quot;RENAMED&quot;;<br />
 tp.doLayout(false,true);<br />
 }</p>
]]></content:encoded>
	</item>
</channel>
</rss>

