+ Start a Discussion

Visualforce Custom Tabs inside records objects instead of APEX: Detail how do you put them in sections

Hello Team,

I have a custom object with tabs created inside the record as section separators.  If I put APEX;Detail it shows ALL the section of the record.  What code should I use to just show them by section so I can show them by each tab.

My APEX Code Below.  

<apex:page standardController="Property__c" showHeader="true" sidebar="false">
    <!-- Define Tab panel .css styles -->
    .activeTab {background-color: #081f3f; color:white; background-image:none}
    .inactiveTab { background-color: lightgrey; color:black; background-image:none}

    <!-- Create Tab panel -->
    <apex:tabPanel switchType="client" selectedTab="Property__c" id="AccountTabPanel"
        tabClass="activeTab" inactiveTabClass="inactiveTab">
        <apex:tab label="Property Information" name="name1" id="tabOne">content for tab one</apex:tab>
        <apex:detail subject="{!Property__c.ownerId}" relatedList="false" title="false"/> 
        <apex:tab label="Building Information" name="name2" id="tabTwo">content for tab two</apex:tab>
        <apex:tab label="Financial Information" name="name3" id="tabThree">content for tab two</apex:tab>
        <apex:tab label="Loan Information" name="name4" id="tabFour">content for tab two</apex:tab>

Thanks nin advance
Hi Jon,

To do that, you will have to use individual fields inside each <apex:tab>, <apex:details> can be use to separate sections.
let me know if this helps!
@Vivek_Patel I guess my question is how or what is the code to do it by sections.?  
Hi Jon, There was typo in my previous comment, <apex:details> can not be used to separate section, it displays the whole record with all the sections, you can separate the fields of each section you have in different <apex:tab>. For that you can use <apex:inputfield>