-
Notifications
You must be signed in to change notification settings - Fork 22
/
SearchableContactList.page
42 lines (37 loc) · 1.62 KB
/
SearchableContactList.page
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
<apex:page controller="SearchableContactListController">
<apex:image url="{!$Resource.banner2}" width="100%" />
<apex:form >
<!-- actionFunction is for calling controller's method -->
<apex:actionFunction action="{!doQuery}" name="apexDoQuery" reRender="myData"/>
<!-- Filter Section -->
<div class="filterDiv">
<label>Filter by Last Name:</label>
<apex:inputText value="{!searchString}" onkeyup="apexDoQuery()"/>
</div>
<!-- my Page Block -->
<apex:pageBlock title="Nominate Contacts" id="myData">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageblockTable value="{!contacts}" var="con"> <!-- con in myContactList -->
<apex:column headerValue="Name">
<a href="/{!con.Id}">
<apex:outputField value="{!con.Name}"/>
</a>
</apex:column>
<apex:column value="{!con.accountid}"/>
<apex:column value="{!con.Phone}"/>
<apex:column headerValue="Email" >
<apex:inputField value="{!con.Email}"/>
</apex:column>
<apex:column headerValue="Nominate" >
<apex:inputField value="{!con.Nominate__c}"/>
</apex:column>
</apex:pageblockTable>
</apex:pageBlock>
</apex:form>
<style>
.filterDiv{ padding: 10px; }
label{ padding: 2px; }
</style>
</apex:page>