响应用户输入
<apex:page controller="ContactListController">
<apex:form >
<apex:pageBlock title="Contacts List" id='contact_list' >
<apex:pageBlockTable value="{! contacts}" var="ct">
<apex:column value="{! ct.FirstName}">
<apex:facet name="header">
<apex:commandLink action="{! sortByFirstName}" reRender='contact_list'>
First Name
</apex:commandLink>
</apex:facet>
</apex:column>
<apex:column value="{! ct.LastName}">
<apex:facet name='header'>
<apex:commandLink action="{! sortByLastName}" reRender="contact_list">
Last Name
</apex:commandLink>
</apex:facet>
</apex:column>
<apex:column value="{! ct.Email}"/>
<apex:column value="{! ct.Title }"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>