- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2024 11:10 AM
I have a viewport using a page collection that I would like to have a button that bubbles up an event to the main page.
I tried the "bubbling up" method here: https://www.youtube.com/watch?v=PwZLd2phUZQ
But they were using viewports/sub pages so I think what worked there does not work with page collections. How would I go about getting a button to trigger an event on a parent page from a page collection viewport?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2024 08:19 AM
Hi @tomasscerba,
do you know how to perform this miracle?
I am having the same issue as @nwilliam . I managed passing params down to the page collection page using a controller, but my event won't bubble up from the child page (page collection) to the parent page. I had the same issue when creating custom components, but it is possible to fix it by adding the event manually in the "eventMappings" (page definition) of that component. Unfortunately this does not seem to work for Viewport Components with Page Collections.
On the child page I added a dispatch event on the body, that is triggered by a click event on a button:
On the parent page I added the same event in the body's handle event section:
Now calling this handled event like in the above video does not work for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
this was the solution for me as well. Thank you for the link!
Regards,
**Martin Virag**
ServiceNow Rising Star
