Viewport Modal Page Collection Caching Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 10:37 AM
I am having an issue with a Viewport Modal in Workspace.
I created a Page Collection and page configured for a Viewport Modal. The associated controller is working as intended and providing outputs to the page as expected.
Within the Page Collection page, the goal is to have client state parameters in which their states are initialized by the output of the controller through a "Page Ready" event handler. The client state parameters will be updated through interactions within the page. Standard stuff like showing and hiding UI elements based on some clicks. An important note, while client state parameters initialize based on the controller outputs, they idea is they would change as the user works within the page (so I cannot just data bind my components to the output).
On a workspace page, I add a Viewport Modal, configure with my Page Collection, and it works like a charm!
Here is the problem - the "Page ready" event in the Page Collection page only fires on the initial open of the modal. On subsequent attempts, the page is cached and it is opened with the previous client state parameter settings. I need to reinitialize based on the new outputs of the controller. A refresh of the Chrome tab is not an option for me.
With the Page Ready event only firing on the first open, what other options do I have in the Viewport Modal page? Is there any event I can trigger based on Controller output changes? Thanks in advance!
#UIBUILDER #NEXTEXPERIENCE #UI #PAGECOLLECTIONS #CUSTOMCONTROLLERS