This is about the "PrimeFaces.monitorDownload".
The file has been successfully downloaded on local computer. It can be opened.
Then the progress bar displayed during the downloading won't hide once download is complete.
Thus blocking the entire page.
Code: Select all
<div id="pageRightSection" class="rightSectionTop">
<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
<p:outputPanel id="mypanel">
<h:panelGroup rendered="#{myModelBean.telechargeable}">
<p:commandButton id="telechargerFichier" value="#{msg.telecharger}" ajax="false" onclick="PrimeFaces.monitorDownload(start, stop)"
icon="ui-icon-arrowthichk-s">
<p:fileDownload value="#{myController.actionTelecharger()}" />
</p:commandButton> #{msg.le_resultat}
<p:dialog appendTo="@(body)" modal="true" widgetVar="statusDialog" header="#{msg.telechargement}" draggable="false" closable="false" resizable="false">
<p:graphicImage value="/images/ajaxloadingbar.gif" />
</p:dialog>
</h:panelGroup>
</p:outputPanel>
</div>
</div>
</div>
</div>
</div>
</h:form>
<script type="text/javascript">
function start() {
PF('statusDialog').show();
}
function stop() {
PF('statusDialog').hide();
}
</script>