Created
May 24, 2011 21:38
-
-
Save fractastical/989778 to your computer and use it in GitHub Desktop.
@fractastical Paginator VF Page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:pageBlock id="recordsection" > | |
<div id="myrecordsection"> | |
<apex:pageBlockSection title="All Assigned Tasks" columns="1"> | |
<apex:pageBlockTable value="{!activePage.pageTasks}" title="Tasks to Review" var="td" id="ttr"> | |
<apex:column headerValue="Name"> | |
<apex:outputField value="{!td.name}"/> | |
</apex:column> | |
... | |
</apex:pageBlockTable> | |
</apex:pageBlockSection> | |
<apex:outputPanel id="taskPageControls"> | |
<apex:commandLink rendered="{!NOT(activePage.first)}" value="First" rerender="recordsection" action="{!updateActivePage}"> | |
<apex:param name="pnum" value="1" assignto="{!pnum}" /> | |
</apex:commandLink> | |
<apex:commandLink rendered="{!hasMorePagesBefore}" value="<" rerender="recordsection" action="{!updateActivePagesBackwards}"> | |
<apex:param name="pnum" value="{!activePagesStartPNumber - 1}" assignto="{!pnum}" /> | |
</apex:commandLink> | |
<apex:commandLink rendered="{!NOT(activePage.first)}" value="Previous" rerender="recordsection" action="{!prevPage}" /> | |
Page: | |
<apex:repeat value="{!activePages}" var="p"> | |
| |
<apex:commandLink rendered="{!NOT(p.isActive)}" value="{!p.pagenumber}" rerender="recordsection" action="{!updateActivePage}"> | |
<apex:param name="pnum" id="pnum" value="{!p.pagenumber}" assignto="{!pnum}" /> | |
</apex:commandLink> | |
<apex:outputText rendered="{!p.isActive}" value="{!p.pagenumber}" /> | |
| |
</apex:repeat> | |
<apex:commandLink rendered="{!NOT(activePage.last)}" value="Next" rerender="recordsection" action="{!nextPage}" /> | |
<apex:commandLink rendered="{!hasMorePagesAfter}" value=">" rerender="recordsection" action="{!updateActivePages}"> | |
<apex:param name="pnum" value="{!activePagesEndPNumber + 1}" assignto="{!pnum}" /> | |
</apex:commandLink> | |
<apex:commandLink rendered="{!NOT(activePage.last)}" value="Last" action="{!goToLast}" rerender="recordsection" /> | |
<apex:outputpanel id="updateTaskNPPControl" > | |
Tasks to display per page: | |
<apex:selectList size="1" value="{!TasksPerPage}" > | |
<apex:selectOptions value="{!TasksPerPageSO}" /> | |
<apex:actionSupport event="onchange" action="{!updateTasksPerPage}" status="updateTasksStatus" reRender="recordsection" /> | |
</apex:selectList> | |
</apex:outputpanel> | |
<BR/> | |
</apex:outputPanel> | |
</div> <!-- end myTasks --> | |
<apex:actionStatus id="updateTasksStatus" onstart="$('#myrecordsection').hide('fast')" onstop="$('#myrecordsection').show();window.scrollTo(0,0);" > | |
<apex:facet name="start"><apex:image value="{!$Resource.GatheringInfoImage}"/></apex:facet> | |
</apex:actionStatus> | |
</apex:pageBlock> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment