Lightning events between Lightning Components and Skuid pages
Has anyone done anything with broadcasting events between Lightning Components and a Skuid page embedded together in a Lightning App? For example:
1. Is it possible for myComponent to emit events that can be received in MySkuidPage?
2. And can MySkuidPage emit events that can be received in myComponent?
This page suggests it should be possible, though having used the code (with some slight modifications to call my own event) in an app similar to the above, there's an error "Uncaught SecurityError: Blocked a frame with origin "https://{mydomainhere}.lightning.force.com"; from accessing a cross-origin frame." I think this may be the LockerService restrictions. I've tried rolling back the API versions of the components to v35, but I get the same error message.
Has anyone experimented with this or have thoughts on if it is possible?
<aura:application>Two questions really:
<c:myComponent/>
<skuid:page name="MySkuidPage"/>
</aura:application>
1. Is it possible for myComponent to emit events that can be received in MySkuidPage?
2. And can MySkuidPage emit events that can be received in myComponent?
This page suggests it should be possible, though having used the code (with some slight modifications to call my own event) in an app similar to the above, there's an error "Uncaught SecurityError: Blocked a frame with origin "https://{mydomainhere}.lightning.force.com"; from accessing a cross-origin frame." I think this may be the LockerService restrictions. I've tried rolling back the API versions of the components to v35, but I get the same error message.
Has anyone experimented with this or have thoughts on if it is possible?
Tagged:
2
Categories
- 7.9K Questions
- 926 Ideas
- 220 Discussion Categories
- 178 General
- 9 Community Feedback
- 3 Community Info
- 18 Knowledge Base
Comments
Not had a chance to revisit it, and changed approach for now anyway. I'll try and re-do the POC at some point. Thanks for replying though - at least I now know it should be possible, so I'll put re-trying on my to do list.
You can now use Events to perform all of the following directions of communication:
Skuid Page Lightning Component <--> Skuid Page Lightning Component
Skuid Page Lightning Component <--> Custom code Lightning Component
See the Millau release documentation on using Events to facilitate inter-component communication with Skuid:
https://docs.skuid.com/v11.0.0/en/skuid/salesforce/event-handling-lightning.html