function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vishnu_SFDCVishnu_SFDC 

Passing value from visualforce Radio Button to Controller

Hi Everyone,
Below is my visualforce page.

<apex:column headerValue="Select" >
     <apex:actionsupport event="onclick" > 
                        <input type="radio" />                   
                            <apex:param name="RepId" value="{!Item.id}">
                        </apex:param></apex:actionsupport>
       </apex:column>
     <apex:column headervalue="Name">
                        <apex:outputfield style="width:2500px" value="{!Item.User__c}">
                    </apex:outputfield></apex:column>
     <apex:column headervalue="Start DateTime">
                        <apex:outputfield value="{!Item.Start_DateTime__c}">
                    </apex:outputfield></apex:column>
      <apex:column headervalue="End DateTime">
                        <apex:outputfield value="{!Item.End_DateTime__c}">
                    </apex:outputfield></apex:column>
      <apex:column headervalue="Approximate Distance To Appointment">
                        <apex:outputfield value="{!Item.Distance__c}">
                    </apex:outputfield></apex:column>
      <apex:column headervalue="Number of events">
                        <apex:outputfield value="{!Item.Number_of_Events__c}">


How can i pass the value of of that row to the controller class.

Thanks in advance.
ezdhanhussainezdhanhussain
Hi Try this, If solved mark it as a solution..
//VF page
<apex:actionsupport action="{!selectcon}" event="onclick" rerender="consel,allcons">  
            <input type ="radio" value="con"/> 
             <apex:param name="conid" value="{!allcon.Id}"/>
  </apex:actionsupport> 

//controller code

Public void selectcon() {
string selectconid = System.currentPagereference().getParameters().get('conid');
//debugging the value 
system.debug('selected id:::::::::::::::::::::::'+selectconid);
}

Vishnu_SFDCVishnu_SFDC
Hi hussain,

thanks for you reply.

I looking for a functionality where when they click save button i have to save that info. 

Thanks,
Vishnu
ezdhanhussainezdhanhussain
What do you want to save ? Can you elaborate a bit more on your query.
Vishnu_SFDCVishnu_SFDC
I have a controller class where i calculate available times and display it in visualforce. Then User slects a radio button with appropriate time slot and clicks save. Then i have to store that User.Id,StartDateTime, EndDateTime in Opportunity. 
Padmini S 26Padmini S 26
Hi Vishnu,

User-added image

I have created above visualforce for display list of technicians. After select the radio button with technician details and click on save button, then selected technician should be assigned as WorkOrder Owner. 

Thanks in advance.