-
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
An Introduction to Salesforce DX
Salesforce DX is a set of tools allowing developers to build collaboratively and deliver continuously. While we work tools like Eclipse, Maven, Ant etc. to…
Salesforce Integration with Vision API | The Ultimate Guide
Integrating Salesforce with Google Vision API requires the following credentials: Salesforce Credentials: You will need to have a Salesforce account with admin permissions to set…
Popular Salesforce Videos
Salesforce Apex Trigger Best Practices | Learn Salesforce Series By Algoworks
In this video, the following points will be covered - 1. One Trigger Per Object 2. Logic-less Triggers 3. Context-Specific Handler Methods 4. Code Bulkification…
Salesforce Consultant | A Day in the life
The Salesforce ecosystem is expected to create over 3.3 million new software jobs by 2022. The demand for people who are willing to learn Salesforce…
Powering Dynamic Gamification on Salesforce Communities With ScoreNotch
Gamifying your online community helps you drive highly-engaging user experiences. While you can host your community on Salesforce Experience Cloud, there are limitations with regard…