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
neao18neao18 

Values of radio button not binding properly!

I have a problem when I am creating a radio button and binding the values from options, when a user select a value then i am storing it in a map as<Id,string> and when they want to review it what i do is get the value of that record id from map and assign  the value to selected list value attribute.

It works fine but when a user multiple time review the selected options then after 2-3 clicks the values are not binding. Help needed. 

Andrew WilkinsonAndrew Wilkinson

Can you post the code?

neao18neao18

--------VF----------

<apex:repeat value="{!recordcoundlist}" var="temp" rows="{!noOfRecords}">
<div style="float:left;width:25%;height:50px">
<apex:commandLink id="gotolink" value="Go to {!temp}" action="{!setpagenum}" reRender="reoutput" onclick="hidediv()">
<apex:param name="{!temp}"
value="{!temp}" assignTo="{!getpagenumber}"/><br/>
</apex:commandLink>
</div>
</apex:repeat>

 

 

Controller------------------

Public Map<Id,String> calresult{get;set;}

//initilised in constructor

 

Public pagereference setpagenum(){
if(getpagenumber!=null || getpagenumber!=''){
setcon.setpageNumber(integer.valueof(getpagenumber));
SFDC_TESTQuestion__c t = new SFDC_TESTQuestion__c ();
if(integer.valueof(getpagenumber)==noOfRecords){
t=sfdcqlist[(noOfRecords-1)];
}
else{
t=sfdcqlist[integer.valueof(getpagenumber)];
}
if(calresult.get(t.Id) != '' || calresult.get(t.Id) != null){
selVal=calresult.get(t.Id);
}
system.debug('&&&&&&sal'+selval);
}
return null;
}