0

I have page where list of users will be listed. User can select a user and add organization to user in a dialog. The add will do post and hide the page dialog.

At this point, when browser reload button is clicked, it cause duplicate post.

How to handle this scenario?

Tiny
  • 27,221
  • 105
  • 339
  • 599
  • 1
    1) Make an Ajaxical post request. 2) Follow the [Post-Redirect-Get (PRG)](http://en.wikipedia.org/wiki/Post/Redirect/Get) design pattern (I mostly do not even think of using it while using JSF/PrimeFaces during basic CRUD operations) 3) Use a request based token to prevent duplicate submits on the server side itself. Which to use when is fully transparently dependent upon you and/or your project's requirements. – Tiny Mar 01 '15 at 10:07
  • See also : http://stackoverflow.com/q/5416070/1391249 – Tiny Mar 01 '15 at 10:24
  • Another dupe: http://stackoverflow.com/questions/23285530/pure-java-jsf-implementation-for-double-submit-prevention – BalusC Mar 02 '15 at 06:14

0 Answers0