Tab Container loading all tabs when page is loaded

5
I have a tab container with two tabs and each contains a data grid with a microflow datasource. I observed that both tabs are getting loaded when page is loaded. I feel this may cause performance issue/app crash if the microflow takes longer time. Want to know if there is a way to load only active tab.
asked
3 answers
5

Not with a datasource microflow. However, if you use from database or xpath it will load the data only when you open the tab.

You can split the page up into multiple pages and style it like a tab. That's a pretty common way of solving performance issues.

answered
1

I was having the same problem.

 

I ended up setting conditional visibilities on the contents of each tab to prevent them from loading.

 

In order to keep track of the current tab index, I used the tab switcher widget, along with a non-persistable entity that stored the current tab index. The tab switcher would update the tab index on that entity. Then the contents of each tab would be visible only if $currentObject/tab = 0, for the first tab, 1 for the second ,etc.

 

Note that setting the visibility on the tab itself did not prevent loading, but I had to set the conditional visibility on the contents of the tab.

answered
0

Thank you all for your suggestions.

@Paul Moes,

Could you please provide little more details about splitting page into multiple pages and style it like a tab. 

answered