-
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
Learn All About Salesforce Hyperforce
Developing a working relationship with customers is critical to a company's long-term success. A strong connection built on trust and communication makes customers feel more…
Salesforce Lightning Web Components Developer Guide Chapter 2: Markup Basics
Here is the second article in our series, where we delve into the LWC basics. In the previous article, we discussed the basic principles and…
Single Sign-on (SSO) for Salesforce with Microsoft Azure AD
What Is SSO? SSO is an abbreviation of Single Sign-On. It is a method for granting access to multiple applications to users with a single…
Popular Salesforce Videos
Salesforce Marketing Cloud Tutorial | Online Training
Salesforce Marketing Cloud (SFMC) is Salesforce’s platform (or “Cloud”) in the area of marketing automation and customer engagement. It is a SaaS platform made up…
Things you can do with Loyalty Management in Salesforce to Create Lifelong Customers
Although keeping customers is not always simple, statistics show that when they are a part of an ongoing customer loyalty management program, they spend 67%…
Overview of Salesforce Development Course | Learn Salesforce Development From Scratch
In this video, Shrey has given a detailed overview of the Salesforce Development Course. You will learn the following topics from this course: Salesforce Development…