简体   繁体   English

如何使用进度条创建p:tabView

[英]How to create p:tabView with progressbar

I want to create p:tabView with progressbar. 我想用progressbar创建p:tabView Something like p:tabMenu - when tab is pressed the label of the tab is changed to Loading I would like to create something similar but with p:tabView . p:tabMenu类的东西-当按下tab时,选项卡的标签更改为Loading我想用p:tabView创建类似的东西。 For example how I can call progressbar like this and sop it when the loading is finished. 例如,如何调用进度并在加载完成后将其浸入。 Is there any possible way? 有什么办法吗?

<p:tabView dynamic="true" cache="false">
    <p:tab id="tab1" title="tab1" >
        <ui:include src="tab1.xhtml" />
    </p:tab>
    <p:tab id="tab2" title="tab2" >
        <ui:include src="tab2.xhtml" />
    </p:tab>
    <p:tab id="ta3" title="tab3" >
        <ui:include src="tab3.xhtml" />
    </p:tab>
    <p:tab id="tab4" title="tab4" >
        <ui:include src="tab4.xhtml" />
    </p:tab>
</p:tabView>

One other option that may work will be to disable the tab label during the loading time. 另一个可行的选择是在加载期间禁用选项卡标签。

No need to disable anything yourself. 无需自己禁用任何功能。 Use primefaces BlockUI to temporarily disable your tab. 使用primefaces BlockUI临时禁用选项卡。 Simply add the following markup to your page: 只需将以下标记添加到您的页面:

  <p:blockUI block="myTabPanel" trigger="tab1,tab2,tab3,tab4" />

where myTabPanel is an id you will assign to your <p:tabPanel/> . 其中myTabPanelid您将分配给您的<p:tabPanel/> See other usages for the blockUi component on the pf showcase 在pf 展示柜上查看blockUi组件的其他用法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM