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
Praz01Praz01 

problem in switching tabs within a visualforce page

Hi,

 

I have written the following code and the tabs are not switching.

 

 

<apex:page id="AdminReportPage" standardController="Account" showHeader="true">
    <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="buyerIdentificationAdmin" id="theTabPanel" tabClass='activeTab' inactiveTabClass='inactiveTab'>
        <apex:tab label="Data Quality Admin" name="dataQualityAdmin" id="tabOne">
            <c:admindataqualitycomponent></c:admindataqualitycomponent>
        </apex:tab>
        <apex:tab label="Buyer Identification Admin" name="buyerIdentificationAdmin" id="tabTwo">
            <c:adminbuyeridentificationcomponent></c:adminbuyeridentificationcomponent>
        </apex:tab>
    </apex:tabPanel>
</apex:page>

 

 

 

Any help will be appreciated

 

Thanks

 

Praz

ipsita.biswas@in.v2solutions.comipsita.biswas@in.v2solutions.com

Hi,

I think the issue is among the two components that you have mentioned in the tabs. Please try and remove the components to test it.

Pradeep_NavatarPradeep_Navatar

Find below a sample working code for tabbed account :

 

           <apex:page standardController="Account" showHeader="true" tabStyle="account" >

                                   <apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">

                                                 <apex:tab label="Details" id="tabdetails">

                                                                <apex:detail relatedList="false" title="true"/>

                                   </apex:tab>

                                                  <apex:tab label="Contacts" id="tabContact">

                                                                                 <apex:relatedList subject="{!account}" list="contacts"/>    

                                                  </apex:tab>

                                                  <apex:tab label="Opportunities" id="tabOpp">

                                                                 <apex:relatedList subject="{!account}" list="opportunities" />

                                                  </apex:tab>

                                                 <apex:tab label="Open Activities" name="OpenActivities">

                                                                <apex:relatedList subject="{!account}" list="OpenActivities" />

                                                  </apex:tab>

                                                  <apex:tab label="Notes and Attachments" name="NotesAndAttachments">

                                                                <!-- apex:relatedList subject="{!account}" list="NotesAndAttachments" />-->

                                                   <c:Comp_Login_Logout />

                                                 </apex:tab>

                                   </apex:tabPanel>

                                </apex:page>

 

Hope this helps.