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
ramya raghavaramya raghava 

apex:tab How to call a custom tab from li tag

I have a list of names with li tags and custom salesforce tabs with the same names. how can make a tab active when i select respected name from the list.

<apex:page>
  <li><a href="#">My Tabs</a>
        <ul>
             <li><a href="#">My First</a></li>
             <li><a href="#">My Second</a></li>
        </ul>
  </li>

<apex:tabPanel switchType="client" selectedTab="t1" id="tab_pannel">
<apex:tab label="My First" name="t1" id="tabOne">
...
</apex:tab>
<apex:tab label="My Second" name="t2" id="tabtwo">
...
</apex:tab>
</apex:tabPanel>
</apex:page>

(ex:Here when i select My First the tab My First should be active....)
Sure@DreamSure@Dream
Hi Ramya Raghava,


Try to do the following and see:
1. converting the anchor tags to <apex:comamndLink> and pass the name of the li tab as param.
2. Converting the selectedtab={!selectedTab}" - a controller variable and based on the param, change the selectedTab variable.

Hope it works.

Thanks