blockUI not preventing double clicks

UI Components for JSF
Post Reply
deelo55
Posts: 33
Joined: 19 Jul 2010, 22:48

17 Oct 2014, 16:34

I have a commandButton on checkout which blocks on checkout button:

Code: Select all

<p:blockUI block="myForm" trigger="checkout">
						<h2>Processing Payment</h2>
						<br />
						<h:graphicImage library="img" name="ajax-loader.gif" />
					</p:blockUI>

					<p:commandButton id="checkout" value="Complete Checkout" action="#{checkoutBean.checkout}" update="@form">
At the end of the checkout method I do:

Code: Select all

	FacesContext.getCurrentInstance().getExternalContext()
					.redirect(confirmationPage);
I'm still getting duplicate orders within a few seconds of each other which would suggest this isn't working as intended. I haven't been able to duplicate the issue...Any suggestions on how to prevent double click from doing multiple checkouts?

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

20 Oct 2014, 21:25

I use pe:blockUI (PrimeFaces Extension blockUI component) javascript methods with onclick="..." and oncomplete="..." to show and hide blockUI component.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests