+ Start a Discussion

Header on a column not showing up?

Hi I have a vf page that shows a list of records, and I want to make the column sortable.

I thought of a way to do this and it's pretty straight forward, the problem I am having; I can't make the header a link.


I want the user to click on the header value to sort the column.

But when I add an apex commandLink to the header the value of the header goes away.


Any insight would be very helpful.




<apex:pageBlockTable value="{!myMessages}" var="msg" > <apex:column width="15%" > <apex:facet name="header"> <b> <apex:commandLink action="{!orderInbox}" value="Subject" rerender="message,inbox" > <apex:param assignTo="{!orderedBy}" name="theOrderedBy" value="msg.name" /> </apex:commandLink> </b> </apex:facet> <apex:outputField value="{!msg.name}" /> </apex:column> </apex:pageBlockTable>




Best Answer chosen by Admin (Salesforce Developers) 

Your code worked for me when I removed <b> </b> tags.


 If this is not the case please could you please supply your complete <apex:pageBlock></apex:pageBlock> content.