UI Builder Sub-Page ACL

Taylor W
Mega Expert

Hello! I am trying to use the viewport component in UI Builder. When I generate a simple sub-page and add a component to it, I get "No Content Available". Does anyone know how to resolve this? I assume I need an ACL to permit Read access to the sub-page but there is not any documentation around how to do so. Any information would be great. Thanks!

1 ACCEPTED SOLUTION

Taylor W
Mega Expert

I figured it out! I needed a "Page Ready" event handler on the parent page which calls the viewport to load. Hopefully this helps anyone else with a similar problem.

View solution in original post

4 REPLIES 4

Taylor W
Mega Expert

I figured it out! I needed a "Page Ready" event handler on the parent page which calls the viewport to load. Hopefully this helps anyone else with a similar problem.

But how did you create the Page Ready? Could you give more details?

Its available main page body tag.

I was able to get my viewports to load using the following client script, then adding a 'Page ready' event on the main pages main 'Body' tag:

function handler({api, event, helpers, imports}) {
        api.emit('MACROPONENT_VIEWPORT_LOAD_REQUESTED', {
        viewportElementId: '<VIEWPORT_ID_HERE>',
        route: '<SUBPAGE_ROUTE_HERE>',
        fields: null,
        params: null
    });

//EXAMPLE
    api.emit('MACROPONENT_VIEWPORT_LOAD_REQUESTED', {
        viewportElementId: 'viewport_1',
        route: 'header_page',
        fields: null,
        params: null
    });  
//rinse & repeat for all viewports
}

App routes table: sys_ux_app_route