cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

No events available before the Mashup loads

TanmeyTWX
17-Peridot

No events available before the Mashup loads

Hi Folks,

 

I have a requirement to show some loading message/gif before the mashup loads. I have tabs selection with lazy loading which takes some time to load the content (expected) once a tab is selected and want to show loading message/gif between this tab click and content load and message disappears once the Mashup load event is completed. But I don't see any event/service to trigger this message display before the mashup load. I can see SetGlobalSessionStringValue being invoked but that's an internal resources call and not part of Mashup design.

 

Any idea?

TIA.

 

TanmeyTWX_0-1684481330593.png

 

 

 

6 REPLIES 6

Hi @TanmeyTWX 

 

You can try to create a popup that shows the loading gif on Mashup load. Once your service execution is completed you can close the popup. 

 

For this, you need to use the expression to validate the service completion status. I create small demo entities that might be helpful for you.

 

/VR

Hi Velkumar,

 

Thanks for the revert.

I know how to put a loading indicator for the long service execution. My query is little different here.

I want to trigger the popup or whatever the placeholder is, before the mashup load event. once the mashup loads I don't have any long running services but mashup load itself takes sometime due to lazy loading.I believe that's not possible but still want to check if something can be done at platform level.

nmutter
14-Alexandrite
(To:TanmeyTWX)

Can you somehow show the loading indicator by default and hide it on MashupLoaded-event?

Maybe the contained mashup you want to load can have no visibility and on MashupLoaded you toggle "loading indicator" with "contained mashup" visibility? But to be honest, I'm not sure if a non visible mashup would even "load" as expected hm. Could be worth a try?

 

VVM_4
4-Participant
(To:nmutter)

I would suggest a similar approach to what @nmutter said.
Use a parent mashup which has a popup and the above mashup which takes time to load as a contained mashup.
On mashup load of parent mashup, show the popup with the required gif.
When the contained mashup finishes loading, update a value in a session variable. On the popup, bind that session such that when it changes, you close the popup.

To be honest 1.42s for loading the mashup is not entirely very bad. In the solution mentioned, the gif (albeit the popup) might appear for a very brief moment.

 

Hope this helps.

jensc
17-Peridot
(To:TanmeyTWX)

Hello,

 

Can't you use the "TabSelected" event to trigger your loading gif or message?

jensc_0-1684756478744.png

Not sure if I entirely follow the flow of events that you have.

But my understanding is that you have a contained mashup in a tab that you use lazy loading on.

In that case you should be able to use the tabs selected event to trigger your message.

However I do not know how you would then close it once the mashup has been loaded... Perhaps by using a session parameter event?

 

Hope this helps.

 

Regards,

Jens

slangley
23-Emerald II
(To:TanmeyTWX)

Hi @TanmeyTWX.

 

Since the lazy loading is occurring in a relatively short period of time in your case, why would you need a gif as opposed to the OOTB functionality that indicates the load is occurring?   Keep in mind that with lazy loading, you're not doing a full load requiring the possibility that calls will be occurring more often which will also impact performance and may frustrate your users.

 

Possibly, we're not understanding your use case.  Can you provide some details around that?

 

Regards.

 

--Sharon

Top Tags