public class Opp {
public String filter{get; set;}
public List < Opportunity > OppList2 {
get;
set;
}
string searchquery = 'select name,accountid,ownerid,closedate,Probability from Opportunity ';
public Opp() {
OppList2 = Database.query(searchquery);
}
public void getresult() {
searchquery = 'select name,accountid,ownerid,closedate,Probability from Opportunity where StageName = :filter ';
OppList2 = Database.query(searchquery);
}
}
To custom visual force picklist value passing to a controller.Please check the below code.
VFPage:
Controller:
Please check the below links for reference.
- http://salesforce.stackexchange.com/questions/87679/custom-visualforce-picklist-value-passing-to-controller (http://salesforce.stackexchange.com/questions/7644/possible-to-pass-selected-picklist-value-to-controller-via-apexparam)
- http://salesforce.stackexchange.com/questions/7644/possible-to-pass-selected-picklist-value-to-controller-via-apexparam
I hope it will be helpful.BestRegards
RahulKumar