PDA

View Full Version : Adding Items to Ext.Panel within a Ext.TabPanel in Ext 3.3.1



nak1
27 Jan 2011, 7:51 PM
So I have a Ext.TabPanel object that I've got several panels in it. Within those panels there are items, which I remove then I add new item that item doesn't appear. This works well as long as I have never rendered this tab before, however, if i have clicked on this tab, then nothing occurs. I've tried doing a doLayout() on the Ext.Panel and the Ext.TabPanel as well. The odd thing, is that it works well in Ext 3.0.0. Very weird... Nevermind, I resolved the issue. It was something in my code.

31 Jan 2011, 4:50 PM
how about posting your solution? As help from the community, give back to the community.

Condor
1 Feb 2011, 4:50 AM
I assume it was a missing call to doLayout.

1 Feb 2011, 4:56 AM
I assume it was a missing call to doLayout.

but he said " I've tried doing a doLayout() " :-\

Condor
1 Feb 2011, 5:04 AM
Yes, but doLayout on hidden items (like non-active tabs) isn't executed in some Ext 3.3 versions (that should work a lot better in Ext 4 - you don't even need doLayout then).

Maybe it only needed layoutOnTabChange:true.

1 Feb 2011, 5:07 AM
perhaps. It still is a good idea for the OP to post a solution to his problem instead of saying "never mind"

nak1
1 Feb 2011, 6:31 AM
Guys,

Sorry for the lack of info on what was going on here. I was using splice instead of slice on one of my arrays that defined the tab items. For some reason, unbeknown to me, Ext 3.0 didn't have an issue with that and still rendered out the tabs just fine, but Ext 3.3.1. The error was a human one, and not something to do with the framework. Thanks again for your interest on the matter.