You need to sign in to do that
Don't have an account?
Bhupendra yadav
Lightning - Passing param on Button click
Hey,
Is there any syntex to pass the parameter along with button click event to client side JS controller from component? just the way we have in VF?
<apex:commandButton value="click Me" action="{!buttonClicked}">
<apex:param name="parameterName" value="param1" assignTo="{!param}"/>
</apex:commandButton>
On the similar line is there anything like below?
<ui:button press='{!c.buttonClicked}'>
<ui:param value='pram1'/>
</ui:button>
Is there any syntex to pass the parameter along with button click event to client side JS controller from component? just the way we have in VF?
<apex:commandButton value="click Me" action="{!buttonClicked}">
<apex:param name="parameterName" value="param1" assignTo="{!param}"/>
</apex:commandButton>
On the similar line is there anything like below?
<ui:button press='{!c.buttonClicked}'>
<ui:param value='pram1'/>
</ui:button>
No this is not possible till now. We don't get that in lightning component as we get in VF Page.
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
In my scenario I have 2 compoments and they talk via an Application Event. On clicking of a button on the first Compoment , I need to pass a parameter to the 2nd Compoment via the Event . I am stuck on how to pass the param from the button click ( as mentioned above its not like the way we do in VF pages ) .
Any pointer/ syntax would be appreciated.
Thanks.