function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
OpsterOpster 

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!

GuyClairboisGuyClairbois

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.

 

nakarootznakarootz
Have you find the solution yet?

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...


stripathystripathy
I am facing same problem. Anyone found the solution yet here?