-
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
Instantly Deploy Free COVID-19 Care Response Solution with Global Salesforce Implementation Partner
World leaders and global health care providers are overwhelmed with inbound calls and an amplified number of cases they are receiving each day affected by…
How to Choose the Best Salesforce Consulting Services for your Business?
Today, Salesforce has become an obvious choice for most businesses looking to implement CRM systems. It is used by thousands of companies worldwide. Salesforce helps…
Macros – One Of The Most "Severely Underused" Salesforce Feature
Salesforce has a number of features. Some of them are useful and mostly used by the Salesforce users and developers, while a few features are…
Popular Salesforce Videos
How To Dominate Peak Shopping Seasons with Salesforce Commerce Cloud?
Peak shopping seasons can make or break a business. In our latest webinar, we break down the power of Salesforce Commerce Cloud and how it…
Understanding Future Method | Difference Between Asynchronous and Synchronous Apex in Salesforce
In this video, Shrey explained Synchronous Apex and Asynchronous Apex in a simple way. He also explained the importance of the Future method in Salesforce.…
Salesforce Partner Program 2020: Everything You Need to Know!
Embarking on this new program year, PY21, Salesforce will be implementing some enhancements to its Partner program to ensure the central focus on customer success…