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
J&A-DevJ&A-Dev 

What's the proper syntax to add an outputLink as a pageBlockTable column?

Hi all,

 

Is it possible to add an outputLink as a column within a table? If so, how can this be achieved?

Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
mcrosbymcrosby
I use something similar to the following to include links next to list entries in a pageBlockTable:

<apex:pageBlockTable value="{!entries}" var="entry">
<apex:column headerValue="Action">
<apex:outputLink value="/{!entry.id}">View</apex:outputLink>
</apex:column>
...
[etc]

 

All Answers

mcrosbymcrosby
I use something similar to the following to include links next to list entries in a pageBlockTable:

<apex:pageBlockTable value="{!entries}" var="entry">
<apex:column headerValue="Action">
<apex:outputLink value="/{!entry.id}">View</apex:outputLink>
</apex:column>
...
[etc]

 

This was selected as the best answer
J&A-DevJ&A-Dev
Thank you!