Progress Bar - displaying on submit

UI Components for JSF
Post Reply
wabisabi2004
Posts: 5
Joined: 20 Jun 2011, 17:01

22 Aug 2011, 17:43

Hello,

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>
When I click on the submit button, the dialog is shown quickly, and then the page is just refreshed. The handler menthod (importBean.saveImports) is not called as well. What's the catch? What I am doing wrong? Has anyone seen something like this before? Any help is greatly appreciated.

Thank you so much in advance.

PF: 3.0.M2
JSF: Mojarra 2.0.3b
AS: JBoss 6.0.0.Final
PrimeFaces: 3.0.M4; JSF Implementation : Mojarra 2.0.3b; Application Server: JBoss 6.1.0.Final

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests