You need to sign in to do that
Don't have an account?

Dynamic Tab Creation
Hi All,
i want to create dynamic tab in visualforce. Under each tab i should have data table and apex:inputFile. The tab, datat table should have custom style.
how to achieve this?
Visualforce:
<apex:dynamicComponent componentValue="{!myTabs}"/>
apex:
public Component.Apex.TabPanel getMyTabs()
{
//create parent panel
Component.Apex.TabPanel myTabPanel = new Component.Apex.TabPanel();
for (integer i=0;i<3;i++) //just a sample, this could easily be a SOQL loop
{
Component.Apex.Tab myTab = new Component.Apex.Tab();
myTab.Label = 'Tab ' + string.valueOf(i+1);
//add child tabs to the parent myTabPanel.childComponents.add(myTab);
}
return myTabPanel;
}
i want to create dynamic tab in visualforce. Under each tab i should have data table and apex:inputFile. The tab, datat table should have custom style.
how to achieve this?
Visualforce:
<apex:dynamicComponent componentValue="{!myTabs}"/>
apex:
public Component.Apex.TabPanel getMyTabs()
{
//create parent panel
Component.Apex.TabPanel myTabPanel = new Component.Apex.TabPanel();
for (integer i=0;i<3;i++) //just a sample, this could easily be a SOQL loop
{
Component.Apex.Tab myTab = new Component.Apex.Tab();
myTab.Label = 'Tab ' + string.valueOf(i+1);
//add child tabs to the parent myTabPanel.childComponents.add(myTab);
}
return myTabPanel;
}
PS: if this answers your question then hit Like and mark it as solution!
@Sumit
apex:tab will not work with apex:repeat.. we have tried