How to make elements (columns) in the <apex: pageBlockTable> hyperlink?
I have successfully created tables with the style that salesforce provided. (e.g. the one that is highlighted when you hover over the mouse, etc.)
But I want the column value to be a link to display detailed information about the object. When I do not create my own visualforce page, the table looks beautiful, and the column values ββ(records) are hyperlinks, but they cannot understand how to do this using visualforce code.
pageBlockTable and the definition of the columns do not seem to have attributes or anything that makes it a hyperlink.
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_pageBlockTable.htm
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_column.htm
<apex:pageBlock title="test"> <apex:pageBlockTable value="{!workObj}" var="item"> <!-- below needs to be hyperlink --> <apex:column value="{!item.name}" /> </apex:pageBlockTable> </apex:pageBlock> I could achieve my goal by throwing away a good design as shown below, but I would like to keep the code above.
This works, but does not apply the Salesforce style.
<apex:pageBlock title="my test title" > <apex:dataTable value="{!workObj}" var="wn" cellpadding="2" cellspacing="2"> <apex:column> <apex:facet name="header">δ»δΊεδΈθ¦§</apex:facet> <apex:form > <apex:commandLink value="{!wn.name}" /> </apex:form> </apex:column> </apex:dataTable> </apex:pageBlock> Instead of <apex:column value="{!item.name}" /> try to do this as in the body of a column:
<apex:pageBlock title="test"> <apex:pageBlockTable value="{!workObj}" var="item"> <apex:column> <apex:outputLink value="{!item.name}">{!item.name}</apex:outputLink> </apex:column> <apex:pageBlock title="test"> <apex:pageBlockTable value="{!workObj}" var="item">