Play Games

Search This Blog

Wednesday, August 27, 2014

Multiple tabs in visualforce page

visualforce page code:

  <apex:page id="thePage">
    <apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">
        <apex:tab label="One" name="name1" id="tabOne">content for tab one</apex:tab>
        <apex:tab label="Two" name="name2" id="tabTwo">content for tab two</apex:tab>
    </apex:tabPanel>
</apex:page>
  
Output:

          







If you want to include visualforce pages in tabs ,the following code helps you.
Here Page1 and Page2 are visualforce pages
<apex:page >
    <apex:tabPanel >
        <apex:tab label="First Tab">
            <apex:include pageName="Page1"/>
        </apex:tab>
        <apex:tab label="second Tab">
            <apex:include pageName="Page2"/>
        </apex:tab>
    </apex:tabPanel>
</apex:page>

No comments:

Post a Comment