You need to sign in to do that
Don't have an account?
SalesforceLearnerNewbie
Select radio button and pass the param to controller
Hi,
Is there a way to pass the param of a clicked radio button back to controller?
Example of my vf page:
<apex:outputPanel id="repeating">
<apex:repeat value="{!change}" var="c">
<apex:selectRadio value="{!save}">
<apex:selectOption itemValue="{!c}" itemLabel="{!c}"><apex:param value="{!c}" assignTo="{!information}" name="c"></apex:selectOption>
</apex:selectRadio>
</apex:repeat>
<apex:actionSupport event="onchange" reRender="repeating" action="{!saveInformation}">
</outputPanel>
Example, if I clicked on button 1 then the information for button one that store in the param could be passed to controller.
Is there a way to pass the param of a clicked radio button back to controller?
Example of my vf page:
<apex:outputPanel id="repeating">
<apex:repeat value="{!change}" var="c">
<apex:selectRadio value="{!save}">
<apex:selectOption itemValue="{!c}" itemLabel="{!c}"><apex:param value="{!c}" assignTo="{!information}" name="c"></apex:selectOption>
</apex:selectRadio>
</apex:repeat>
<apex:actionSupport event="onchange" reRender="repeating" action="{!saveInformation}">
</outputPanel>
Example, if I clicked on button 1 then the information for button one that store in the param could be passed to controller.
Please refer below link:
https://success.salesforce.com/answers?id=90630000000hU42AAE
https://salesforce.stackexchange.com/questions/49121/how-to-get-the-selected-radiobutton-value-in-apex
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
Deepali Kulshrestha