问题
I have a TabPanel on my XPage. When i move from one Tab to another, few data is loading and this takes some time.
Is it possible to show a loading screen, while changing Tabs?
Thanks for your help
Regards
回答1:
You should take a look at xe:djTabContainer
and xe:djTabPane
. That's the XPages extension library versions of the Dojo tab container. It provides support for loading content in all tabs at once or using partial refresh with the option to add a loading message.
Update
Paul Withers commented on the loadingMessage
property. It does work with all content. Here's a simple example:
<xe:djTabContainer id="djTabContainer1" doLayout="false">
<xe:djTabPane id="djTabPane1" title="Tab 1" partialRefresh="true" refreshOnShow="true" partialEvents="true" loadingMessage="LOADING LOADING LOADING">Tab 1</xe:djTabPane>
<xe:djTabPane id="djTabPane2" title="Tab 2" partialRefresh="true" refreshOnShow="true" partialEvents="true" loadingMessage="LOADING MORE LOADING MORE">Tab 2</xe:djTabPane>
</xe:djTabContainer>
When you switch tabs, you can very briefly see the loading message.
回答2:
You can use the standby dialog custom control for that:
http://openntf.org/XSnippets.nsf/snippet.xsp?id=standby-dialog-custom-control
It basically injects itself into the partial refresh mechanism. If it takes more than a specified duration for any AJAX request, standby dialog will be shown to the user.
来源:https://stackoverflow.com/questions/25259889/xpages-loading-screen-while-changing-tabs-tabpanel