Delay Page load based on Condition

I have a page layout wherein a Server Connect on success populates the Session storage, on the pages that use the layout the session storage data is utilized to display the charts, however, when the page loads the session storage isn’t populated intime for the charts to fetch the data, as a result, the charts show up blank and show correctly on refresh/reload of the page.

Is there a way we can delay the page from getting loaded based on the condition that data is being populated in the session storage?

Have you considered adding a page preloader to the page ?

image

maybe a Page Flow would work?

First getting the Session Storage… and the running the server connect.

preloader would be just an animation until all components load in the background, this wouldn’t work, however, I tried it as well assuming it might hold off the page, didn’t work.

Page Flow - Arn’t this Single page use App flows. This Issue here is that I can control with App/Page flows the delay on the Server Connect on getting the data populated in the Session, The issue is the Chart components on the page itself, which try to look for the data (in Session Storage) at page load, but isn’t there yet, there is a delay in milliseconds. If I refresh the page then it finds the data and loads the charts properly.
Is there any way to hold off the page from loading till the server connect completes it action?

You can put the chart in a conditional region, that evaluates to true when the server connect has run – something like serverconnect1.data.