+ Start a Discussion
uxtx_timuxtx_tim 

modify <apex:detail for customized detail section - access to detail fields

 

I am using standardList controller for a custom object where the list entries are referred to as 'entry'

When you click on an individual entry (as a commandLink) the <apex:detail> area shows the standard detail for the object ie name, owner, modified, custom fields, etc.

Much like "Implementing Partial Page Updates with Command Links and Buttons" in the VF Dev Guide

 

How do I reference the individual fields for the entry in the detail?  

 

For example, how would I show only the name or a customField__C in the detail?  Is there another VF component I could use that will take an url+ object id as an argument to use in a redirect?

 

 Here's my detail area on the VF page - takes the url of the selected object id as 'subject' and displays all of the fields in the detail tag.

 

 

            <apex:outputPanel id="sigDetail">
                 <apex:detail subject="{!$CurrentPage.parameters.eid}" relatedList="false" title="false"/>   
             </apex:outputPanel> 
            
 I thought I could say something like {!$CurrentPage.parameters.eid.name} or {!$CurrentPage.parameters.eid.customField__c} but it doesn't seem to work that way.  What I'm actually trying to do involves much more than simply displaying a single field, but I do need to isolate the fields individually in order to get started.
Any help would be much appreciated.

 

Best Answer chosen by Admin (Salesforce Developers) 
ministe2003ministe2003

The subject of a detail tag needs to be an ID of a record of an sObject so you cant use it to render just a field.  In that case just use outputfield or outputtext, there's no need for the detail tag as far as I can see.