简体   繁体   English

使用进度条实现 <pe:exporter > 在主要方面

[英]progress bar implementation using <pe:exporter > in primefaces

I would like to export data to Excel. 我想将数据导出到Excel。 Right now I am able to achieve this using <pe:exporter> . 现在我可以使用<pe:exporter>实现这一目标。 But when data is huge, it takes a lot of time to export to Excel. 但是当数据量巨大时,导出到Excel需要花费大量时间。 I would like to show a progress bar while exporting data to excel. 我想在将数据导出到excel时显示进度条。 How can I achieve this? 我怎样才能做到这一点?

Add this to your xhtml : 将其添加到您的xhtml:

<p:ajaxStatus onstart="PF('statusDialog').show()" onsuccess="PF('statusDialog').hide()" />

<p:dialog widgetVar="statusDialog" modal="true" draggable="false" closable="false" resizable="false" showHeader="false">
    <p:graphicImage name="/images/ajaxloadingbar.gif" />
</p:dialog>

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

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