1

I have installed a lightning component from a managed package, in which an application event is being fired on the click of an button. Now I want to handle that event in my another component which I am working on.

my name space is om_ltng . My event name is showResultEvent

<aura:event type="APPLICATION"   >
  <aura:attribute name="search_value" type="String"/>
  <aura:attribute name="search_name" type="String"/>
</aura:event>

This event is defined in the managed package. So in my method I am handling it like this.

  <aura:handler event="om_ltng:showResultEvent" action="{!c.getValueFromApplicationEvent}"/>

but it is showing error something like this Failed to save undefined: No EVENT named showResultEvent found: Source. Thoughts plz.

0

Are you registering your application event using this syntax?

 <aura:registerEvent type="om_ltng:showResultEvent"...

It can be found in the docs here

  • Thanks for your answer. But I found the fix for my problem. I was missing access="global" in the declaration and in the registration of event. – OzAs Jun 3 '16 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.