Im trying to pass values to apex controller from vf page but values are not passing. could you guys please check where im going wrong.


<apex:repeat value="{!am.names}" var="n"> 
          <input type="radio" name="name"  value="{!n}"/> 
          <apex:actionsupport event="onclick" action="{!getSelectedInfo}">
              <apex:param assignTo="{!checkedname}" name="checkedname" value="{!n}" />

APEX Controller:

public static string checkedname{get;set;}    
public void getSelectedInfo(){
    system.debug('Selected name  '+checkedname);
  • It is likely because the variable checkedname is a static variable. – manjit5190 Oct 26 '20 at 15:42
  • instead of using <input ...>, use an apex:inputText, styled as a radio – cropredy Oct 27 '20 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.