PDA

View Full Version : [CLOSED] setting Visible to False on Tab causes js error



idrissb
Sep 14, 2008, 4:19 AM
following some of the advice, i am now trying to create a number of tabs in the OnInit event says 10 tabs and setting the Visible property to False. however when i do that (using 0.5.4) i get the following javascript error


: missing
from debug


{id:"pnlContent",region:"center",items:{id:"CenterPanel",xtype:"tabpanel",items:[{id:"tbHome",title:"
Home
",contentEl:"tbHome_Content"},{xtab0_ClientInit},{id:"xtab1",title:"xtab1",border:false,closable:true}

you can see xtab0 is the tab i set visible to false

this is the code used to create the tabs


protected override void OnInit(EventArgs e)
{
base.OnInit(e);

string id = "";
for (int i = 0; i < 10; i++)
{
id = string.Concat("Tab", i.ToString());
Tab tab = new Tab(id, id, id);
tab.Visible = false;
this.TabPanel1.Tabs.Add(tab);
}
}

thank you in advance for your help. also, if I was using client side, what is best practice to save state stave and restore the tabs ona postback.

idrissb
Sep 14, 2008, 4:23 AM
reading another post, it seems that it is fixed in 0.6. how can i get the fix.

and i do have at least one tab set to visible.

thanks again

geoffrey.mcgill
Sep 14, 2008, 5:20 AM
Hi idrissb,

I looked quickly at the source files, but I think the fix involved changing code in several places. I won't be able to extract the exact source and send it to you. 


The fix will be available with the v0.6 release. The following thread is tracking the release of v0.6, see http://forums.ext.net/showthread.php?threadid=1224-7-1.aspx. The fix is also available to svn subscribers. 

idrissb
Sep 14, 2008, 12:42 PM
Geoff

how can i become a svn subscriber.
thanks

geoffrey.mcgill
Sep 14, 2008, 12:52 PM
Hi idrissb,

From the Support (/support/) page:


Premium Technical Support Subscriptions are available to purchase and include direct access to the project source code (SVN read-only), premium forum access, email and phone support. Support Subscription Options (/purchase/#support)
Hope this helps answer your question.

idrissb
Sep 14, 2008, 12:56 PM
thanks for your help Geoff.