You need to sign in to do that
Don't have an account?
West415
Get value of selet list on <apex: action="{!getValueOfSelectList}" />
Hi,
I have a custom visualforce page. I have an <apex:selectList /> that has a default value set when the page loads. How can I get the value of the selected item in the select list in my controller?
How can this be done?
I have a custom visualforce page. I have an <apex:selectList /> that has a default value set when the page loads. How can I get the value of the selected item in the select list in my controller?
<apex:page controller="CustomController" showHeader="true" sidebar="true" action="{!showMeSelectedValue}">In jQuery, the equivalent may be something like $('#fieldID').val(); On page load, when the "showMeSelectedValue()" is called, I want to get the value of a given select list on my page.
How can this be done?
kindly read below thread for same kind of issue. you will get some idea for your's as well.
https://developer.salesforce.com/forums/?id=906F000000096tTIAQ
hope this solve your issue.
thanks
karthik
I think this can be done in the constructor of the controller class. You just need to put the default value to the varible you want to use to show the
dafault selected value in the vf page. Please refer the sample vf page .I think this will help you. Please let us know for anyother help.Thanks.