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
bheemudu neelibheemudu neeli 

Need a help on Apex:tab with Apex:include componets in a single vf page, can't we use in a sinle page?

Hello All,
I have a doubt on Apex:include and apex:tab compontes, I can include one vf page inside to other, while same time Apex:tabs are not worlking?, so we can't use the both components in a single vf page?.
if I use the below code my Apex:tabs are not working, I need help.

<apex:page standardController="Account" showHeader="true" 
      tabStyle="account" >
  <style>
      .activeTab {background-color: #236FBD; color:white; 
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black; 
         background-image:none}
   </style>
   
   <apex:include pageName="FieldSetTest" id="xyz"/>
   <apex:tabPanel switchType="client" selectedTab="tabdetails" 
                  id="AccountTabPanel" tabClass="activeTab" 
                  inactiveTabClass="inactiveTab">   
      <apex:tab label="Details" name="AccDetails" id="tabdetails">
         <apex:detail relatedList="false" title="true"/>
                 
      </apex:tab>
      <apex:tab label="Contacts" name="Contacts" id="tabContact">
         <apex:relatedList subject="{!account}" list="contacts" />
      </apex:tab>
      
      <apex:tab label="NewSec" name="NewDetails" id="tabdetails1">
                    <apex:dataTable value="{!account}" var="a">
         <apex:column value="{!a.name}" />
         <apex:column value="{!a.name}" />

         </apex:dataTable>         
      </apex:tab>
      
      <apex:tab label="Opportunities" name="Opportunities" 
                id="tabOpp">
         <apex:relatedList subject="{!account}" 
                           list="opportunities" />
      </apex:tab>
      <apex:tab label="Open Activities" name="OpenActivities" 
                id="tabOpenAct">
                <apex:dataTable value="{!account}" var="a">
         <apex:column value="{!a.name}" />
         </apex:dataTable>
         <apex:relatedList subject="{!account}" 
                           list="OpenActivities" />
      </apex:tab>
      <apex:tab label="Notes and Attachments" 
                name="NotesAndAttachments" id="tabNoteAtt">
         <apex:relatedList subject="{!account}" 
                           list="CombinedAttachments" />
      </apex:tab>
   </apex:tabPanel>
</apex:page>
....................................................

Thanks 
Bheemudu 
pconpcon
I took your code, put it in place with a custom page I wrote and it works perfectly.

AccountForm.vfp
<apex:page standardController="Account">
    <apex:form >
        Hello <apex:inputField value="{!Account.Name}" />
        <br /><apex:commandButton value="Submit" action="{!save}" />
    </apex:form>
</apex:page>

ApexTabs.vfp
<apex:page standardController="Account" showHeader="true" tabStyle="account" >
    <style>
        .activeTab {background-color: #236FBD; color:white;
            background-image:none}
        .inactiveTab { background-color: lightgrey; color:black;
            background-image:none}
    </style>

    <apex:include pageName="AccountForm" id="xyz"/>
    <apex:tabPanel switchType="client" selectedTab="tabdetails"
                    id="AccountTabPanel" tabClass="activeTab"
                    inactiveTabClass="inactiveTab">
        <apex:tab label="Details" name="AccDetails" id="tabdetails">
            <apex:detail relatedList="false" title="true"/>

        </apex:tab>
        <apex:tab label="Contacts" name="Contacts" id="tabContact">
            <apex:relatedList subject="{!account}" list="contacts" />
        </apex:tab>

        <apex:tab label="NewSec" name="NewDetails" id="tabdetails1">
            <apex:dataTable value="{!account}" var="a">
                <apex:column value="{!a.name}" />
                <apex:column value="{!a.name}" />
            </apex:dataTable>
        </apex:tab>

        <apex:tab label="Opportunities" name="Opportunities" id="tabOpp">
            <apex:relatedList subject="{!account}" list="opportunities" />
        </apex:tab>
        <apex:tab label="Open Activities" name="OpenActivities" id="tabOpenAct">
            <apex:dataTable value="{!account}" var="a">
                <apex:column value="{!a.name}" />
            </apex:dataTable>
            <apex:relatedList subject="{!account}" list="OpenActivities" />
        </apex:tab>
        <apex:tab label="Notes and Attachments" name="NotesAndAttachments" id="tabNoteAtt">
            <apex:relatedList subject="{!account}" list="CombinedAttachments" />
        </apex:tab>
    </apex:tabPanel>
</apex:page>

This produces

User-added image

So if you are having problems, it may be with your FieldSetTest visualforce page.  Can you please include the content of FieldSetTest as well as a better description (or screenshot) of what is happening when you load your Visualforce page with the Id parameter set to that of an Account.

NOTE: When adding code, please use the "Add a code sample" button (icon <>) to increase readability and make it easier to reference.