XPages: Loading Screen while changing Tabs (TabPanel)

这一生的挚爱 提交于 2019-12-11 06:56:02

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!