You need to sign in to do that
Don't have an account?
Aruna Vasahan
pass object from lightning component to controller with onclick
I am having my component
Here on the radio button with the onclick event I am trying to pass the record as a whole to my controller side. But I am not able to do so. Can anyone help me in this?
<aura:attribute name="persAccountList" type="Map" default="" /> <table class="slds-table slds-table_bordered slds-table_cell-buffer"> <thead> <tr class="slds-text-title_caps"> <th>{!$Label.c.ACC_Select}</th> <th>{!$Label.c.Rforce_PersAcc_Lastname}</th> <th>{!$Label.c.ACC_First_name}</th> <th>{!$Label.c.ACC_Postal_Code}</th> <th>{!$Label.c.ACC_City}</th> <th>{!$Label.c.ACC_Email}</th> <th>{!$Label.c.ACC_Last_Mobile}</th> </tr> </thead> <tbody> <aura:iteration items="{!v.persAccountList}" var="accountResult"> <tr> <td> <input type="radio" name="select" value="" data-value="{!accountResult}" onclick="{!c.radioclick}"/></td> <td>{!accountResult.lastName} </td> <td>{!accountResult.firstName} </td> <td>{!accountResult.zip} </td> <td>{!accountResult.city} </td> <td>{!accountResult.email} </td> <td>{!accountResult.phoneNumber} </td> </tr> </aura:iteration> </tbody> </table>
Here on the radio button with the onclick event I am trying to pass the record as a whole to my controller side. But I am not able to do so. Can anyone help me in this?
javaScript :
Hope it will helps you
Thanks
I want the firstname and lastname from the object. How to get that? I tried the below code, but not getting anything.