+ Start a Discussion
smitrasmitra 

Linking with records from pageblock table

Hi All,

I have a dynamic table which displays search result based on differnt entities

common display attribute is name

please let me know how do I incorporate hyperlink with name.

<apex:pageBlockTable rendered="{!ObjectList!=null}" value="{!ObjectList}" var="rec">
                <apex:column value="{!rec.Id}" rendered="{!IF(SelectedFields.size == 0 , true, false)}"/>
                <apex:repeat value="{!SelectedFields}" var="FieldLable">
                    <apex:column value="{!rec[FieldLable]}" rendered="{!IF(FieldLable != '--None--' , true, false)}">
                    </apex:column>
                </apex:repeat>
   </apex:pageBlockTable>






RavIndra VemulaRavIndra Vemula
Hope below code works:

<apex:column >
<apex:outputLink value="/{!rec.Id}">{!rec.Name}</apex:outputLink>
</apex:column>
smitrasmitra
Hi in the above code along with the name I want to display some more attributes.that is why i have used an array of fields where name attribute is the first field.

<apex:repeat value="{!SelectedFields}" var="FieldLable">
                    <apex:column value="{!rec[FieldLable]}" rendered="{!IF(FieldLable != '--None--' , true, false)}">
                    </apex:column>
                </apex:repeat>

Please let me know how can I link the name field with the actual record