UI Builder Page Collection Bubble Event

nwilliam
Tera Contributor

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?

On this episode, join Brad, Chuck, and Earl as they explore viewports in UI Builder in the Rome release. Useful Links: * Community Live Stream: Document IDs https://community.servicenow.com/community?id=community_blog&sys_id=d3fec975db2d9410d58ea345ca9619e0 * Platform Academy Series ...
1 ACCEPTED SOLUTION

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:

fujan_0-1733846963507.png

fujan_1-1733847010823.png

On the parent page I added the same event in the body's handle event section:

fujan_2-1733847221235.png

Now calling this handled event like in the above video does not work for me.

 

 



 

View solution in original post

15 REPLIES 15

this was the solution for me as well. Thank you for the link!



Regards,
**Martin Virag**
ServiceNow Rising Star