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
sp08830sp08830 

Tab ReRender

I have this tab panel which switches back to Upload Tab after an update on UpdatePage. How to make it stay on Update tab? Thanks.

 

<apex:page >
   <apex:tabPanel switchType="client">
      <apex:tab label="Upload" >
         <apex:include pageName="UploadPage"/>
      </apex:tab>
      <apex:tab label="Update">
         <apex:include pageName="UpdatePage"/>
      </apex:tab>
    </apex:tabPanel>
</apex:page>
Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

Use a variable in your class, like so:

 

public string selectedTab { get; set; }

And set the tabPanel's selectedTab value to this variable.

 

You will need to make sure that switch type is not "client", or any action methods you set correctly set the value of selectedTab.

All Answers

sfdcfoxsfdcfox

Use a variable in your class, like so:

 

public string selectedTab { get; set; }

And set the tabPanel's selectedTab value to this variable.

 

You will need to make sure that switch type is not "client", or any action methods you set correctly set the value of selectedTab.

This was selected as the best answer
sp08830sp08830

Worked great. Thanks. 

 

<apex:tabPanel value="{!selectedtab}" switchType="Ajax" tabClass="activeTab" inactiveTabClass="inactiveTab">