You need to sign in to do that
Don't have an account?
Brad Riley
Message Edited by Brad Riley on 08-05-2008 09:02 PM
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)
Code:
<apex:page standardController="Case" extensions="Claim_Detail_Extension" showHeader="true" tabStyle="Case" action="{!init}"> <!-- Define Tab panel .css styles --> <style> .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;} </style> <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> <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> </div> </apex:form> <apex:outputPanel id="detail"> <apex:detail relatedList="false" relatedListHover="false" subject="{!Case.Id}" title="false" /> </apex:outputPanel> </apex:tab> </apex:tabPanel> </apex:page>
This results is all the required fields being displayed twice in the <apex:details> block.
Cheers
Message Edited by Brad Riley on 08-05-2008 09:02 PM