forked from SalesforceSFDC/Apex-Classes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPagingTasksController.vfp
53 lines (48 loc) · 2.7 KB
/
PagingTasksController.vfp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<apex:page controller="PagingTasksController">
<apex:form >
<apex:pageBlock title="Tasks" id="pgBlock">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" id="saveButton" value="Save"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel"/>
</apex:pageBlockButtons>
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
<apex:inputText id="searchBox" value="{!searchText}"/>
<apex:commandButton value="Search" reRender="pgTable,pgBlock" action="{!findTasks}"/>
<apex:pageBlockTable value="{!Tasks}" var="tsk" id="pgTable" >
<apex:column >
<apex:outputLink value="{!URLFOR($Action.Task.Delete, tsk.id,['retURL'='/apex/Task_Assignment_Features'])}" >Delete</apex:outputLink>
</apex:column>
<apex:column headerValue="Subject">
<apex:facet name="header">
<apex:commandLink value="Subject" action="{!toggleSort}" rerender="pgTable" >
<apex:param name="sortField" value="Subject" assignTo="{!sortField}"/>
<apex:outputPanel rendered="{!BEGINS(sortField,'Subject')}">
<apex:image value="{!IF(sortDir = 'desc','/img/arrowDown.gif','/img/arrowUp.gif')}"/>
</apex:outputPanel>
</apex:commandLink>
</apex:facet>
<apex:outputField value="{!tsk.Subject}"/>
</apex:column>
<apex:column headerValue="Status">
<apex:outputField value="{!tsk.Status}"/>
</apex:column>
<apex:column headerValue="Priority">
<apex:outputField value="{!tsk.Priority}"/>
</apex:column>
<apex:column headerValue="OwnerId">
<apex:outputField value="{!tsk.OwnerId}"/>
</apex:column>
</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton value="Previous" action="{!Previous}" rerender="pgTable,pgBlock"
status="status" disabled="{!DisablePrevious}" />
<apex:commandButton value="Next" action="{!Next}" reRender="pgTable,pgBlock"
status="status" disabled="{!DisableNext}" />
<apex:actionStatus id="status" startText="Please Wait..."/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
<apex:enhancedlist type="Activity" height="800" rowsPerPage="50" customizable="False"/>
</apex:page>