You need to sign in to do that
Don't have an account?
golu
selectoption values in visualforce page
Hi,
I am trying to pass the values from apex controller to visualforce page for radio buttons. Then i want to pass back the selected value in the controller. can anybody please help. The code written so far
I am trying to pass the values from apex controller to visualforce page for radio buttons. Then i want to pass back the selected value in the controller. can anybody please help. The code written so far
Visualforce page <apex:repeat value="{!optionsListvf}" var="s"> <apex:selectRadio > <apex:selectOption > {!s} </apex:selectOption> </apex:selectRadio> </apex:repeat> Apex class public List<string> optionsListvf {get;set;} Public static String buttonbehaviourvf{get;set;} public QuestionAnswerController(){ String question =apexpages.currentpage().getparameters().get('question'); String optionsList=apexpages.currentpage().getparameters().get('optionsList'); String buttonbehaviour = apexpages.currentpage().getparameters().get('buttonbehaviour'); questionvf=question; String finalOptions = optionsList.replace('(','').replace(')',''); optionsListvf=finalOptions.split(','); buttonbehaviourvf=buttonbehaviour; }
Updated the vf page code and apex class
Visualforce page Apex Class
Kindly mark this as solved if the reply was helpful.
Thanks
Shaik