I would like to display a progress bar for a lenghty import operation on a submit click. I.e. just to give user a visual progress bar in a modal dialog while the server does its 60 seconds of workload importing the data. So my plan was to show the dialog with the running progress, while I wating for the handler method to complete.
Here is the page for that (please note that submit is not ajax enabled):
Code: Select all
<h:form id="f1">
<p:messages />
<p:dataTable var="data" .../>
<p:panel>
<p:commandButton action="#{importBean.cancel}" value="Cancel"
ajax="false" immediate="true" />
<p:commandButton action="#{importBean.saveImports}"
value="Import" ajax="false" />
</p:panel>
<p:dialog id="dlg" widgetVar="dlgVar">
<h3>Importing Data...</h3>
<p:progressBar id="prg" widgetVar="prgVar" value="#{importBean.progress}"/>
</p:dialog>
</h:form>
Thank you so much in advance.
PF: 3.0.M2
JSF: Mojarra 2.0.3b
AS: JBoss 6.0.0.Final