<apex:component controller="MenuController">
<apex:tabPanel switchType="client">
<apex:repeat value="{!menus}" var="menu" id="theRepeat">
<apex:tab label="{!menu.name}" name="{!menu.id}">content for tab one</apex:tab>
</apex:repeat>
</apex:tabPanel>
</apex:component>
Can any one please tell me what is wrong in this program? Why is this not creating a menus tab?
Attribution to: Pramod Kumar
Possible Suggestion/Solution #1
So you want to create your tab dynamically. I think the better way to do this is to use dynamic component. Check the SF-Docs out:
Dynamic Visualforce Components
Attribution to: Sergej Utko
Possible Suggestion/Solution #2
It is not supported. The apex:repeat
component cannot be used as a direct child of the following components according to the apex:repeat docs.
This component cannot be used as a direct child of the following components:
- <apex:dataTable>
- <apex:pageBlockTable>
- <apex:panelBar>
- <apex:selectCheckboxes>
- <apex:selectList>
- <apex:selectRadio>
- <apex:tabPanel>
Attribution to: Peter Knolle
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4893