sorting - Need extension controller for the following visual force page -
to have complete visualforce code provide pagination account records in table requirement try provide sorting function on table.
so want extension controller provide sorting function ascending , descending functionality(because new in extension controller)for visual page. keep in mind pagination function worked in sorting function.
my page 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>
for answer's in advance.
your question belongs salesforce stackexchange, have more answers here https://salesforce.stackexchange.com/
please delete 1 , create on salesforce se :)
Comments
Post a Comment