-
How to use apex:actionsupport such that it only saves the last radiobutton in repeat in Salesforce?
I build a radiobutton within a repeat of a list and then use actionsupport with event set to "onchange".
Example,
<apex:outputPanel id="repeating">
<apex:repeat value="{!change}" var="c">
<apex:selectRadio value="{!save}">
<apex:selectOption itemValue="{!c}" itemLabel="{!c}" />
</apex:selectRadio>
</apex:repeat>
<apex:actionSupport event="onchange" reRender="repeating" action="{!saveInformation}">
</outputPanel>However, this code only work on the final/last button. What I wanted it to do is to be able to save more than 1 button and any button that is changed. My current code only work on example;
button 1 *when pressed, nothing happen*
button 2 *when pressed, nothing happen*
button 3 *when pressed, this button can be saved*I wish it to be able to save any pressed buttons and also able to take more than 1 buttons to save.
Is there a way to alter my code or should I make any changes?
Log In to reply.
Popular Salesforce Blogs
Salesforce DX – The X Factor For Salesforce Developers
Dreamforce always comes with a box of tech surprises every year. 2016 was no exception, one of the big points of discussion was Salesforce DX.…
Application Event in Lightning Component in Salesforce
As we have discussed Component Events in my previous blog which is also one of the events helps to communicate between two components. Now you…
How Integrated CRM Payment Solution can Help Nonprofits | Salesforce Solutions
If your fundraising team is spending hours monthly to manually import and export data from the increasing payment providers, then they are definitely doing it…
Popular Salesforce Videos
Creating Massive Junction Records with LWC | Salesforce Lightning Tutorial
Don't miss this new interchange session with Jorge Ortega and Alba Rivas! They'll discuss how to build an LWC that allows you to easily create…
How to Reference Custom Metadata Types to Optimize Salesforce Account Records Using Salesforce Flow
Watch this video to learn how to reference custom metadata types to optimize Salesforce Account Records Using Salesforce Flow Salesforce Account Region Allocation using custom…
Salesforce Lightning Training
Here, the video is about the Salesforce Lightning Tutorial. These video covers comprise real-world projects that will introduce you to advanced concepts such as Lightning…