You need to sign in to do that
Don't have an account?
TabPanel renders in Visualforce page w/ Custom Controller but tabs are not clickable
I am trying to use a TabPanel within a custom Visualforce page with a custom controller.
The Tabs are rendering in the page, but they are not clickable and when I set the default selected tab to something other than the "tab1" it never renders with that tab selected. Only "tab1" renders as selected even if selectedTab="tab2".
Do "apex:tabPanel"'s only work on Visualforce pages with Standard Controllers? Or is there something I need to implement in my controller to enable things?
I am using some basic example code like below:
<style>
.activeTab {background-color: #236FBD; color:white;
background-image:none}
.inactiveTab { background-color: lightgrey; color:black;
background-image:none}
</style>
<apex:tabPanel switchType="client" selectedTab="tab1"
id="MyTabPanel"tabClass="activeTab"
inactiveTabClass="inactiveTab">
<apex:tab label="Some Tab" name="Some Tab" id="tab1">
Some Content Tab1
</apex:tab>
<apex:tab label="Some Other Tab" name="Some Other Tab" id="tab2">
Some Content Tab2
</apex:tab>
</apex:tabPanel>
thanks in advance!
Your example is running fine, I can click the tabs. Are you sure you copied the switchType="client" to your own code?
The default selected tab is based on the name-tag and not on the id.
I'm facing the same problem. I already tried all the exemples and my tabs never work. They are not clickable at all, only one tab comes selected. And that's it, nothing else happens to the page...