+ Start a Discussion
SalluSallu 

Create Tabs and TabPanels Dynamically.

I have a requirement where i need to create a page having many tabs as well as tabPanels. The number of tabs to be displayed is decided at run time. i tried using tabPanel inside repeat but it renders tabPanels again and again but not the tabs. Is there any way to do this using visualforce?

 

for eg: say i have three tabPanels:

 

tabPanel 1 :

 

tab1 tab2 tab3

this contains three tabs(say)

 

tabPanel 2 :

tab 1 tab 2

this contains two tabs(say)

 

etc.

 

again when next time i render the page, tabPanel 1 may have 4 tabs and also an added, tabPanel.

 

 

Any Suggestion will be appreciated.

 

Thanks in advance.

emilyftwemilyftw

I had this same problem a few months ago. This is currently not supported (see this thread for more details: http://community.salesforce.com/t5/Visualforce-Development/Moderators-VF-experts-A-bug-with-repeat-tabs-full-code-to/m-p/81010 ). JQuery has some pretty nice javascript libraries to generate tabs, so I ended up using that.

Mitesh SuraMitesh Sura

Developers and ISVs please vote for this idea: https://success.salesforce.com/ideaView?id=08730000000kteEAAQ

Amit Chaudhary 8Amit Chaudhary 8

Please check below link. That will help you :-
http://amitsalesforce.blogspot.in/2014/11/dynamic-tab-in-salesforce-css-and.html