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
raj123raj123 

Action support not working with the <input type radio>

 

 

 

<apex:column headervalue="Select"> <apex:actionregion >
<apex:actionsupport action="{!selectedContact}" event="onclick" >
<input type="radio" name ="contact" />
<apex:param name="conid" value="{!con.Id}" assignTo="{!conid}">
</apex:param> </apex:actionsupport></apex:actionregion>
</apex:column>

 

// tried public selectedcontact() instead of page reference

Public pagereference selectedContact(){
selcontactid = System.currentPagereference().getParameters().get('conid');
system.debug('selected contact:::::::::::::'+selcontactid);
system.debug('selected contact conid:::::::::::::::::'+conid);
return null;
}

 

the method is being called ut the conid is printing null

mast0rmast0r

Why don't you try selectRadio? I think you can not pass params with a "normal" HTML tags:

 

<apex:column headervalue="Select">
    <apex:selectRadio value="{!searchString}">
        <apex:actionsupport action="{!selectedContact}" event="onclick" >
            <apex:param name="conid" value="{!con.Id}" assignTo="{!conid}"/>
        </apex:actionsupport>
    </apex:selectRadio>
</apex:column>

 

reddygari403reddygari403

<apex:page sidebar="false" standardController="DataloadTest__c" recordSetVar="records">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockTable value="{!records}" var="r">
<apex:column headerValue="Name">
<apex:actionsupport event="onclick" rerender="out" status="mystatus">
{!r.Name}
<apex:param name="rId" value="{!r.Id}"/>
</apex:actionsupport>
</apex:column>
<apex:column headerValue="City">
{!r.city__c}
</apex:column>
<apex:column headerValue="Country__c">
{!r.country__c}
</apex:column>
<apex:column headerValue="phone">
{!r.Phone__c}
</apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>

<apex:actionstatus id="mystatus" startText="loading.................">
<apex:facet name="stop">
<apex:outputpanel id="out">
<apex:detail subject="{!$CurrentPage.parameters.rId}" relatedList="false"/>
</apex:outputpanel>
</apex:facet>
</apex:actionstatus>
</apex:form>
</apex:page>

 

class:

==========