-
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
Experience the Future of Sales with Salesforce AI-based Tools
Solving strategic problems is more important than handling operational tasks when it comes to achieving critical targets in sales. Usage of Salesforce AI-based Tools allows…
What are Apex Triggers in Salesforce? | The Developer Guide
What are Triggers? Apex can be invoked by using triggers. Apex triggers enable you to perform custom actions before or after changes to Salesforce records,…
5 Mistakes to Avoid in 2023 When Implementing Salesforce Cloud!
Salesforce is a potent cloud-based CRM that gives organizations of all sizes capabilities for sales, marketing, and customer service. All of these powerful Salesforce features,…
Popular Salesforce Videos
Validation Rules in Salesforce | Video Tutorial Guide
In this video, Srinu Namani briefs about Validation Rules in Salesforce. Validation rules are an important part of keeping your data clean and organized, and…
Google Lead Form Extension To Salesforce | Salesforce Tutorial
Google Lead Form extension to Salesforce. This tutorial will cover the following points - 1. Introduction Learn how to integrate leads from Google lead form…
Workplace Command Center | Salesforce
Protect employees and customers with safer workplaces. Use our Workplace Command Center to quickly take action on workplace safety.