0

I have this simple form example :

<h:form id="testForm">
 <p:commandButton ajax="false" value="New" />
</h:form>

If I click in the button and then refresh the page. The browser notifies that the form will be sent again. How can I avoid this ?

Thanks.

MadNeox
  • 2,453
  • 3
  • 15
  • 26
  • 1
    possible duplicate of [Pure Java/JSF implementation for double submit prevention](http://stackoverflow.com/questions/23285530/pure-java-jsf-implementation-for-double-submit-prevention) – Kukeltje May 01 '15 at 16:55

1 Answers1

1

Agree on the duplicate, however there are no examples. One option would be to use

<p:commandButton ajax="false" value="New" action="page.xhtml?faces-redirect=true"/>
Jaqen H'ghar
  • 4,305
  • 2
  • 14
  • 26