-
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
What are Field Dependencies in Salesforce in 2023? | All You Need to Know
Salesforce is a powerful CRM platform that allows businesses to customize and tailor the software to their specific needs. One of the ways this is…
Tips to Find the Right Salesforce Managed Services Provider for Small Business
Choosing the right Salesforce Managed Services provider can be tough for small businesses. You need a partner who understands your needs, fits your budget, and helps you grow.…
Aggregate Functions in Salesforce - The Developer Guide
In Spring ‘10, Salesforce released new Apex functionality for total functions in SOQL. These queries return an AggregateResult object. Utilize aggregate functions in a Group…
Popular Salesforce Videos
Salesforce CPQ Tips to Accelerate Sales Cycle
Learn how to accelerate your sales cycle with Salesforce CPQ! Optimize your product catalogue by streamlining listings, removing outdated items, and categorizing products effectively. Automate…
Create Custom Object, Tabs and ListView in lightning, Salesforce
In this video, DeveloperTrix explains how you can create custom objects, custom object tabs, and list views in the Salesforce platform. He also covers how…
Governor Limits in Salesforce | Video Tutorial
Watch this amazing video to learn all about Governor Limits in Salesforce and a description of Governor Limits in Salesforce. If you have any doubts…