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
Brad RileyBrad Riley 

Overriding Case detail view - apex:details element rendering extra fields

We have overridden the Case detail view so that we can display all the information in a tab format.  On the first tab we are using the <apex:details> element to render the page layout we have defined using the 'drag-and-drop' page layout editor.  However, we notice that all the fields marked as 'Always display' are shown twice!  Once where we have positioned them in the layout, and again at the bottom of the first pageblocksection.
Is this a bug? Any ideas?
Some example code are:
Visualforce page (which overrides the Case detail view)


<apex:page standardController="Case" extensions="Claim_Detail_Extension" showHeader="true" tabStyle="Case" action="{!init}">
<!-- Define Tab panel .css styles -->
.contentStyle { font-size:12px; }
.buttonStyle { width:100%; background-color:#B7A752; text-align:center; padding-top:4px; }
.activeTab {background-color: #B7A752; color:white; background-image:none}
.inactiveTab { background-color: #F3F3EC; color:black; background-image:none} 
.NoRecord { font-size:11px;} 
<apex:sectionHeader title="Claim Details" subtitle="{!Case.CaseNumber}" />
<apex:tabPanel contentClass="contentStyle" tabClass="activeTab" inactiveTabClass="inactiveTab" switchType="client" selectedTab="claimDetails" immediate="false">
<apex:tab label="Details" name="claimDetails" id="claimDetails" style="background-color: #F3F3EC;">
<apex:form >
<div class="buttonStyle">
<apex:outputPanel id="detailButtons">
<apex:commandButton action="{!Edit}" value="Edit" ></apex:commandButton>
<apex:commandButton action="{!SearchCRIS}" value="Search CRIS" rendered="{!RenderSearchCRIS}" ></apex:commandButton>
<apex:commandButton action="{!CloneClaim}" value="Clone" rendered="{!RenderCloneClaim}" ></apex:commandButton>
<apex:commandButton action="{!NextStatus}" value="Notify" rendered="{!RenderNotify}" immediate="true" rerender="detailButtons, detail, OpenActivities"> 
<apex:commandButton action="{!NextStatus}" value="Admit" rerender="detailButtons, detail" immediate="true" rendered="{!RenderAdmit}" ></apex:commandButton>
<apex:commandButton action="{!CloseClaim}" value="{!CloseButtonText}" rendered="{!RenderCloseClaim}" ></apex:commandButton>
<apex:commandButton action="{!PrintDocument}" value="Create Letter" />
<apex:outputPanel id="detail">
<apex:detail relatedList="false" relatedListHover="false" subject="{!Case.Id}" title="false" />

This results is all the required fields being displayed twice in the <apex:details> block.



Message Edited by Brad Riley on 08-05-2008 09:02 PM