• nakarootz
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

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!

  • January 29, 2013
  • Like
  • 0