You need to sign in to do that
Don't have an account?
akshay desai 9
I used this code in my vf controller
public List<SelectOption> getmonth() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('JANUARY','January'));
options.add(new SelectOption('FEBRUARY','February'));
options.add(new SelectOption('MARCH','March'));
options.add(new SelectOption('APRIL','April'));
options.add(new SelectOption('MAY','May'));
options.add(new SelectOption('JUNE','June'));
options.add(new SelectOption('JULY','July'));
options.add(new SelectOption('AUGUST','August'));
options.add(new SelectOption('SEPTEMBER','September'));
options.add(new SelectOption('OCTOBER','October'));
options.add(new SelectOption('NOVEMBER','November'));
options.add(new SelectOption('DECEMBER','December'));
return options;
}
now I want to show data of may if user select may how should I do that?
how to compare custom picklist value in vf controller
I used this code in my vf controller
public List<SelectOption> getmonth() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('JANUARY','January'));
options.add(new SelectOption('FEBRUARY','February'));
options.add(new SelectOption('MARCH','March'));
options.add(new SelectOption('APRIL','April'));
options.add(new SelectOption('MAY','May'));
options.add(new SelectOption('JUNE','June'));
options.add(new SelectOption('JULY','July'));
options.add(new SelectOption('AUGUST','August'));
options.add(new SelectOption('SEPTEMBER','September'));
options.add(new SelectOption('OCTOBER','October'));
options.add(new SelectOption('NOVEMBER','November'));
options.add(new SelectOption('DECEMBER','December'));
return options;
}
now I want to show data of may if user select may how should I do that?
Greetings to you!
Below is the sample code. Kindly modify the code as per your requirement.
Visualforce:
Controller:
Reference: http://sfdcsrini.blogspot.com/2014/07/how-to-use-apexselectoptions-and.html
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
for that i need if else if user select may show data
for that how can i fetch the value of a picklist