You need to sign in to do that
Don't have an account?
Geetha B
I am not getting picklist values from controller can anyone help me.
here is the vf page and controller
<apex:page controller="getListOptions">
<apex:form >
select <apex:selectList size="1" title="Country">
<apex:selectOptions value="{!lstoptions}"></apex:selectOptions>
</apex:selectList>
</apex:form>
</apex:page>
___________________________________________________
public class getListOptions
{
public list<selectoption> lstoptions{get; set;}
// public list<selectoption> lstoptions{get; set;}
public list<selectoption> getlstoptions()
{
list<selectoption> options = new list<selectoption>();
options.add(new selectoption('','select country'));
options.add(new selectoption('India','IND'));
options.add(new selectoption('US','US'));
options.add(new selectoption('Canada','CA'));
return options;
}
}
<apex:page controller="getListOptions">
<apex:form >
select <apex:selectList size="1" title="Country">
<apex:selectOptions value="{!lstoptions}"></apex:selectOptions>
</apex:selectList>
</apex:form>
</apex:page>
___________________________________________________
public class getListOptions
{
public list<selectoption> lstoptions{get; set;}
// public list<selectoption> lstoptions{get; set;}
public list<selectoption> getlstoptions()
{
list<selectoption> options = new list<selectoption>();
options.add(new selectoption('','select country'));
options.add(new selectoption('India','IND'));
options.add(new selectoption('US','US'));
options.add(new selectoption('Canada','CA'));
return options;
}
}
thanks,
Ramesh
try this,
Thanks