-
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
How to Call Server-Side Apex Controller Action from Client-Side Controller in Lightning Component?
Server-Side Controller method can be invoked by the client-side controller by using the value provider of c. Client-side action can also be invoked by using…
How To Use Tokens in Salesforce Lightning?
This is one of the cool features of Salesforce lightning mainly used for styling in components.You need to define code, values only once and use…
What is QuickBooks Unrecoverable Error and To mend it? | Salesforce
We are not denying the fact that QuickBooks has found its place in the business of accounting software. But any other software could cause certain mistakes.…
Popular Salesforce Videos
How to Start a Process with Parameters on UiPath Robots from Salesforce Interface
How to start a process with parameters on UiPath Robots from the Salesforce interface. Watch this video and learn. Let us know in the comments…
How to Logging Automated Emails on Related Records
Learn how to logging automated emails on related records. We will show you how to create a process builder using the package Send Emails. This…
Attribute Setup for Skill based Routing in Salesforce
This video is 3rd Part of the Omnichannel Series. Implementation of Attribute set up skill-based routing with the demo. Do let us know in the…