You need to sign in to do that
Don't have an account?
Valentin F.
Getting error while trying to pass informations with application event
Hello everybody,
I'm creating an app with 3 different components.
I already have an application event to pass results of my queries in my component 1 to components 2 & 3.
I'd like to pass informations from component 2 to component 1 (the one binded to apex controller), do a soql query with these informations and sent the results in the first event.
The problem is that my second event is already fired when I try to select it and set it parameters.
Here is my code :
Thank you for your help and your answers !
I'm creating an app with 3 different components.
I already have an application event to pass results of my queries in my component 1 to components 2 & 3.
I'd like to pass informations from component 2 to component 1 (the one binded to apex controller), do a soql query with these informations and sent the results in the first event.
The problem is that my second event is already fired when I try to select it and set it parameters.
Here is my code :
Component2.cmp <aura:registerEvent name="Event2" type="c:Event2"/>
Component2Helper.js var object1 = object; var event = $A.get("e.c:Event2"); event.setParams({"object1": object1}); event.fire();
Event2.evt <aura:event type="APPLICATION"> <aura:attribute name="object1" type="Object"/> </aura:event>And here is the error I get :
Thank you for your help and your answers !
I needed to create a component event. When this component event was fired, it called my other application event and passed it data. The application event fired too and pass data to my other component.
EventCmp.evt Event2.evt Component2.cmp Component2Controller.js Component2Helper.js