progressBar keeps polling on validation error

UI Components for JSF
Post Reply
pmeidl
Posts: 12
Joined: 27 Jan 2011, 12:11

01 Feb 2011, 10:43

I have a form which starts a progressBar when the submit button is clicked. the progressBar is inside a modal dialog. here is the relevant code:

Code: Select all

<p:commandButton id="findLatestSubmit" action="#{findLatestBacking.findLatest}" value="#{findLatestRes.findLatestButton}"
update="@form" onclick="resultProgressDialog.show();resultProgressBar.start()" />

<p:dialog id="resultProgressDialog" header="Processing..." modal="true" widgetVar="resultProgressDialog">
	<p:progressBar id="resultProgressBar" ajax="true" widgetVar="resultProgressBar" value="#{findLatestBacking.mappingProgress}"
		interval="1000" style="height: 3px" oncomplete="resultProgressDialog.hide()"
		completeListener="#{findLatestBacking.handleProgressComplete}" cancelListener="#{findLatestBacking.handleProgressCancelled}"
		onCompleteUpdate="@this, resultProgressDialog" />
</p:dialog>
everything works fine unless there is a validation error in the form (e.g. one of the required fields is empty). in that case, the progressBar keeps polling the server for the progress value. obviously, this is bad - if the user just goes away, there will be zombie processes hitting the server.

is this know behaviour? how can I fix this? I have a cancelListener, but I can't see how I could tell the client there to stop polling.

TIA
PrimeFaces 2.2.1
Mojarra 2.0.3.b03
Apache Tomcat 6.0.29

pmeidl
Posts: 12
Joined: 27 Jan 2011, 12:11

01 Feb 2011, 10:50

I just found that after a validation error, even if the user fixes the input error and re-submits the form, the progressBar still doesn't stop, even though the result is displayed (I should mention that the action method returns null, i.e. the result is displayed in the same view as the form).
PrimeFaces 2.2.1
Mojarra 2.0.3.b03
Apache Tomcat 6.0.29

datahub
Posts: 5
Joined: 14 May 2013, 20:58

01 Aug 2013, 19:19

did you resolve this problem? I'm seeing the same behavior

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests