Created
September 6, 2012 19:05
-
-
Save dancinllama/3659538 to your computer and use it in GitHub Desktop.
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 Controller code | |
public List<SelectOption> filterCriteria{ | |
get{ | |
//TODO change the names to labels | |
List<SelectOption> options = new List<SelectOption>(); | |
for(Account a : [Select Name,Value__c From Account Limit 10]){ | |
options.add(new SelectOption(a.Value__c,a.Name); | |
} | |
return options; | |
} | |
} | |
<!-- VF code --> | |
<!-- Controller has filter string member variable which this select list assigns the selected value to… --> | |
<apex:selectList value="{!filter}" size="1"> | |
<apex:selectOptions value="{!filterCriteria}" /> | |
<apex:actionSupport event="onchange" action="{!filterAccounts}" rerender="id1,id2"/> | |
</apex:selectList> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment