Navigate and LoadContentInArea actions

Hey guys,
So I just learned that the Navigate and LoadContentInArea actions cannot happen at the same time:


The solution I’ve come up with so far is that the event that triggers navigate will also toggle a session var, and the session var valueChanged is what then does the LoadContentInArea action. My solution isn’t the cleanest though, as Navigate and LoadContentInArea don’t quite happen at the same time, the HMI lags between both actions.
I just gotta know if there’s a better way of executing Navigate and LoadContentInArea at the same time.

Hi, I think your “problem” does not have simple solution. There will be always small lag. During navigation, page layout, areas and default contents must be loaded first and then you can load your content using action LoadContentInArea. Small theory about page navigation princip you can find here B&R Online Help. To be faster with content loading, you can use preCaching B&R Online Help. If there is content which is used more often than others, you can set it as a default to your Area. If this is not a solution you can maybe create empty content with picture or message loading or something similar that operator will realize that he has to wait. This I would use if the lag time will be really high. You can also try to use event contentLoaded instead of workaround with session variable B&R Online Help

2 Likes

I guess I’ll stick with what I got. I was just curious to see if there was any special way that the community had for performing those 2 actions. Thanks!

JackLin, depends again what you are trying to do.

I assume you want to navigate to a new page but the content shown is depending on something else maybe?
What you could do is to reference a default blank content on the page area that is status dependent. Whenever you navigate to the page with this blank content an EventBinding is waiting for the ContentLoaded event (on that specific blank content) and with that trigger your LoadContentinArea action.

We are actually doing this same principal in the mapp-framework for the new and edit recipe dialog. Because the same dialog is used for recipe parameter and machine settings the actual content gets loaded based on the current category selection. So by default the dialog area just references RecipeDialog_empty which gets replaced by either RecipeDialog_NewPars_content or RecipeDialog_NewMachConfig_content after the Dialog was opened/loaded.

1 Like

exactly @marcel.voigt , that is basically what I tried to explain as well.So this is not a solution for “his lag”. There will be always delay between empty content, or content with label "loading…"or whatever and his new content loaded by loadContentInArea. it is important to understand that mappView visualization will never react like iPad touch screen and similar. But I think this is ok and acceptable in the industrial field.

2 Likes