-
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

AI-Powered Salesforce Integrations: Reevaluating Traditional Tools
In the ever-evolving world of technology, I recently discovered the power of AI bots for generating Apex and middleware code for Salesforce integrations. The results?…

Achieving Quick Wins with Successful Salesforce Implementation | Greytrix
Are you planning a Salesforce implementation for your company? Well, you came across this post at the right time! Whereas Salesforce implementation is a revolutionary decision for your organization,…

What are Schedule-Triggered Flows? | The Ultimate Guide
What are Schedule-triggered Flows? Schedule-triggered flows start up at predetermined intervals and let you automate Salesforce activities. Teams can greatly benefit from this kind of…
Popular Salesforce Videos
How to Translate/Override Custom Labels in Salesforce
In this video, you can see how to translate or override custom labels that come with installed managed packages in Salesforce.
How To Change Opportunity Stages In Salesforce
If you're finding that you need to change the stages of opportunity in Salesforce, don't worry, it's easy to do. In this video, Gary Smith…
When to Use Apex? | Flows of Action in Apex | Learn Salesforce Development
In this Video Shrey explained When to use Apex and Flows of Action in APEX. Let's Learn the End User and Developer action (Flows of…