2016-10-26 8 views
0

ビジュアルフォースコードを完成させて、テーブルのアカウントレコードのページ設定を自分の要件として提供しましたが、そのテーブルにソート機能を提供しようとしています。次のビジュアルフォースページの拡張コントローラーが必要

ので、私は私の視覚的なページのために(私は 拡張コントローラに新しいですので)昇順にソート機能 を提供し、機能を下降する拡張コントローラをしたいです。だから私のページネーション機能もソート機能で一緒に働いていることに留意してください。

マイページは、followingly事前に答えのおかげについては

<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> 

です。

答えて

0

ご質問は、SalesforceのStackExchangeに属している、あなたはここでhttps://salesforce.stackexchange.com/

より多くの答えを持っていますこれを削除し、SalesforceのSEにそれを作成してください:)

関連する問題