2016-10-26 25 views
0

为了我所有我已经完成的visualforce代码提供表中的帐户记录分页作为我的要求,但我尝试提供该表上的排序功能。需要扩展控制器为下面的视觉力页面

所以我想延长控制器为我的可视化页面提供的上升排序功能 和下降功能(因为我在 扩展控制器新)。所以请记住,我的分页功能也在排序功能中一起工作。

我的页面是从动地,

<apex:page standardController="Account" recordSetVar="accountvar"> 
    <apex:sectionHeader title="My Accounts" subtitle="Account List View"/> 
     <apex:form > 
      <apex:pageBlock > 
       <apex:pageMessages id="error" /> 

       <apex:panelGrid columns="7" id="buttons" > 
       <!---<apex:pageBlockButtons>----> 
        <apex:commandButton reRender="error,blocktable,buttons" action="{!Save}" value="Save"/> 
        <apex:commandButton reRender="error,blocktable,buttons" action="{!Cancel}" value="Cancel"/> 
        <apex:inputHidden /> 
        <apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasprevious}" action="{!First}" value="First"/> 
        <apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasprevious}" action="{!Previous}" value="Previous"/> 
        <apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasnext}" action="{!Next}" value="Next"/> 
        <apex:commandButton reRender="error,blocktable,buttons" disabled="{!!hasnext}" action="{!Last}" value="Last"/> 
       <!---</apex:pageBlockButtons>---> 
       </apex:panelGrid> 

       <apex:pageBlockSection id="blocktable" > 

        <apex:pageBlockTable value="{!accountvar}" var="t"> 

          <apex:column headerValue="AccountName" value="{!t.Name}"/ >             
          <apex:column headerValue="BillingState/Province" value="{!t.BillingState}"/> 
          <apex:column headerValue="Phone" value="{!t.Phone}"/> 
          <apex:column headerValue="Type" value="{!t.Type}"/>     
          <apex:column headerValue="Account Owner Alias" value="{!t.Owner.Name}"/> 
          <apex:column headerValue="Website" value="{!t.Website}"/> 

         <apex:inlineEditSupport event="onClick"/> 


        </apex:pageBlockTable> 

       </apex:pageBlockSection> 


      </apex:pageBlock> 
     </apex:form> 
    </apex:page> 

对于提前答案的感谢。

回答