2016-10-26 4 views
0

Pour tout j'ai compléter le code visualforce pour fournir la pagination pour les enregistrements de compte dans le tableau comme mon exigence mais j'essaye de fournir la fonction de tri sur cette table.J'ai besoin de contrôleur d'extension pour la force visuelle suivante page

donc je veux le contrôleur d'extension pour assurer la fonction de tri avec le croissant et la fonctionnalité descendante (parce que je suis nouveau dans le contrôleur d'extension) pour ma page visuelle. Alors gardez à l'esprit ma fonction de pagination est également travaillé ensemble dans la fonction de tri.

Ma page est 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> 

Pour les remercie à l'avance de réponse.

Répondre

0

Votre question appartient à Salesforce StackExchange, vous aurez plus de réponses ici https://salesforce.stackexchange.com/

S'il vous plaît supprimer celui-ci et créer sur Salesforce SE :)