Lightning Events in Lightning Page Context

So I have a community builder page with 2 custom lightning components I've dropped into different sections - how do I make them communicate via events?

Lightning Events in Lightning Page Context

I know that when you have a component inside another component, I can use component events to trigger actions in the component hierarchy. And when I have 2 components within the same Lightning App, I can use APPLICATION events to trigger actions across any component in the App.

How does it work if I have components on a Lightning page? They are not nested inside the same App (we're using Community Builder), and the components aren't nested within the same hierarchy.


On the same page, in a community you'd be within the same domain, making your components part of the same application event level access, even if you didn't define them as part of the same application. You could of course define ExternalEvent Handlers for the "window" but that shouldn't be necessary. See the Advanced Events Example for more on this topic.

Category: lightning components Time: 2016-08-01 Views: 30

Related post

  • Is there a way to handle a Lightning Event from a Visualforce Page using Lightning Out? 2016-01-24

    It's documented that Lightning Events can be fired from Non-Lightning code. However, I'm looking for a way to do the opposite. I'd like to be able to create a lightning component that will function in Lightning Experience and both Sales Cloud and Ser

  • When I use lightning component in visualforce page I get Error on my visualforce page 2016-07-23

    I am stuck, when I use my lightning component in visualforce page it work fine until i am not using prefix name in visualforce page. When i use prefix name then it will show error"Something has gone wrong. Action failed: PZ33$SelectOptionsForAddress$

  • Is there any way to add lightning component to a page layout? 2015-01-21

    I need to add lightning component to opportunity page layout. Like mobile cards. Is there any way to add lightning component to the page layout? --------------Solutions------------- As of the Spring 15 release while Lightning Components is still in b

  • Add Lightning Component to VisualForce Page or Component 2016-02-26

    I'm trying to bring a Lightning component through so that it is visible in a VisualForce Component, but a VF page is ok if this isn't doable. I've checked a number of resources that say similar things: (All non-linked links are http://) Lightning Com

  • Lightning Event Model 2016-03-03

    I understand how to code lightning event from developer guide, but still some of part of me puzzling why the event handling needs to be such a lengthy process and declarative instead of some simple code in javascript/jquery, right now you need to do

  • Lightning Tab with Lightning Component throwing error (but the same component loads fine with App Preview, on SF1 & VF Page lightning out) 2016-06-14

    We have a lightning component, which is being used in VF page Lightning out, SF1, App Preview & Lightning Tab in Lightning experience. Until Summer'16 it is working fine. Now it doesn't load in lightning experience, but loads fine in others. The belo

  • Panel pages context and View contextual filters - cannot get it working 2014-01-13

    I have a content type which has field_section of type Taxonomy term. Views I created a View pane with contextual filters set to field_section. It means that the view pane should show all nodes which have field_section set to a specified value. It wor

  • Creating and Managing Events Using Facebook Pages 2014-06-23

    If you are running a Facebook page, Facebook Events is a great tool for inviting your fans to a specific event. Facebook recently made it easier for you to set up an event and invite all of your fans, or just a selection of fans. Let's see how that w

  • Facebook PHP API, Post an Event on a Page. 2015-08-17

    Hello there. I'm searching for a few days now and I still haven't found a way to post events into a page I'm admin on, so I've decided to ask you. Can you do that in any way? I've tried with "me/events" page and it w

  • Salesforce lightning components in lightning applications not displaying text? 2015-11-20

    so I'm trying to embed a Lightning component into a Lightning Application - I have managed to do this however If I was to put this in the lightning component;- <h1>Hello world</h1> It will not display inside the lightning application anywhere.

  • Custom Event's Plugin pages 2016-02-24

    I'm trying my hand at creating an events plugin from scratch for a client with fairly specific needs. I've gotten so far as setting up the CPT, creating and saving the metaboxes that I need with some google maps api integration to show the location o

  • Capturing save events on Lightning detail page inside a component 2016-06-15

    So I have a Lightning component on a Lightning detail page. Whenever a user updates some value on the record, I want to refresh this component. Basically want to pull in some fields based on the changed values. But how to find out that a save event h

  • salesforce lightning event e.force:navigateToComponent is disabled now? 2015-02-16

    I am trying to build navigation from one component to another in a Lightning application. Following this answer How to set up views and navigation in Lightning? got me working with one exception, the new page doesn't seem to be in the Salesforce1 nav

  • Lightning Event firing but doing nothing 2015-05-12

    For the context, my idea is the same as in the Lightning Component Dev's Guide at step 6 for the standalone app : Make the App Interactive With Events The only difference is I don't render the form on my page at the moment the event is triggered from

  • Encrypt Lightning event invite mails with pgp 2014-11-28

    I use Thunderbirds/Icedoves Lightning add-on to manage my calendar, tasks and notes. When creating an event I can add attendees and send invitations to them, but they won't use their public pgp keys to encrypt the invitation. How can I force the invi

  • Lightning: How to detect Salesforce1 context? 2015-04-07

    Are there any way to detect that user opens lightning component within Salesforce1 or within separate app? --------------Solutions------------- Some events are handled specifically within Salesforce1, so you can use that to check context. See this li

  • Which is corresponding event in Lightning Component? vs load or DOMContentLoaded within document 2015-04-20

    In init and afterRender of component, I attached handler to DOMContentLoaded and load like below, but seems never executed. document.addEventListener('DOMContentLoaded', function () { console.log("@@@ DOMContent is Loaded. The text never shows up.&qu

  • Lightning: How to change page title for lightning app? 2015-04-21

    Could you please share an idea how to change page title for lightning app? --------------Solutions------------- Today you can add this: document.title = "Your Title"; in your .app's init handler: <aura:handler value="{!this}" name=&

  • Aura event namespace lightning component package 2015-06-25

    I went through an example showing contact list search etc. In the SearchBarController.JS we have this line: var myEvent = $A.get("e.**namespace**:SearchKeyChange"); And this works fine where implemented. Dropping the namespace causes an error. 1

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.252 (s). 13 q(s)