function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Yashita Goyal 17Yashita Goyal 17 

How to pass attribute values to lightning application controller

The structure of code is as follows:

1. Component A has 3 picklist fields and a button
2. On click of button event is fired and control goes on Application controller
3. I want to have these 3 picklist field values which user has selected above in application controller

Can someone please help.


Yashita Goyal
Pramodh KumarPramodh Kumar
If you want to pass the variable to the parent component, you have to use the event and which you have to fire and has to handle in your parent controller.

this is the example for the component events

application event

let me know if you have any questions

Yashita Goyal 17Yashita Goyal 17
The structure of code is somewhat like this:

Application code:
<aura:attribute name="selObj" type="String"/>
 <c:FilterComponent />
Filter Component code:
<aura:attribute name="selectedObject" type="String"/>

I want the "selectedObject" value to be accessed in application controller in variable "selObj".

In this scenario how will we use event?