+ Start a Discussion
AKallAKall 

Problems with tabbed detail page.

Hello,
I have created a tabbed detail page for a custom object that basically follows the example for a tabbed Account page in the latest cookbook. I am experiencing a problem with the default tab. It contains the details of the controller object and two related lists. When a record is first opened the details appear as expected, however after viewing a different tab and then returning to the default tab only the related lists appear, and the details of the record are missing. The tab in question has the label "Licensing Contracts". Can anybody see what the problems is?

Code:
<apex:page standardController="ContractPlus__c" showHeader="true" tabStyle="ContractPlus__c">
    <apex:tabPanel selectedTab="contractPlus" id="contractPlusTabs">
        <apex:tab label="Licensing Contracts" name="contractPlus" id="contractDetails">
            <apex:detail title="true" relatedList="false"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="ContractParticipants__r"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="SubContracts__r"/>
        </apex:tab> 
        <apex:tab label="Document Tracking">
            <apex:relatedList subject="{!ContractPlus__c}" list="ApprovalSteps__r"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="Files__r"/>
        </apex:tab> 
        <apex:tab label="Terms, Products and Invoicing"> 
            <apex:relatedList subject="{!ContractPlus__c}" list="ContractProducts__r"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="ContractTerms__r"/> 
            <apex:relatedList subject="{!ContractPlus__c}" list="InvoiceRequests__r"/>
        </apex:tab> 
        <apex:tab label="History and Activity">
            <apex:relatedList subject="{!ContractPlus__c}" list="NotesAndAttachments"/>
            <apex:relatedList subject="{!ContractPlus__c}" list="OpenActivities"/> 
            <apex:relatedList subject="{!ContractPlus__c}" list="ActivityHistories"/> 
        </apex:tab>               
    </apex:tabPanel>          
</apex:page>