You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ralf Baumhof <ra...@web.de> on 2010/06/07 12:22:55 UTC

Prevent double click / double enter of form with IE 7 or 8

some days ago i focused on the problem "how to prevent the user 
pressing twice or even more times the enter button or clicking a button several 
times" in a jsf form. In my tests the problem only come's up with IE and
 hitting enter some times. This problem is also discussed in [http://forums.sun.com/thread.jspa?threadID=665472] 
 or in [http://book.javanb.com/the-java-developers-almanac-1-4/egs/javax.servlet.jsp/myformts.jsp.html-l=new.htm].
 


However, the client side solutions don't work very good, 
especially preventing enter seems to be a hard problem. I'am wondering 
if somebody has got a very good working server side solution. I'am 
actually testing a solution where i render a time token in the form and 
save this in an Stateful Session EJB Vector list. First request is 
passed (time token is saved in list), all subsequent request are blocked
 because the time token is already saved in the list. This works so far 
that only one request saves data. But i have got still 2 problems. 


- Concurrent access on the jsf (session scoped) backing bean 
leads to unpredictable errors.

- Which response should i send back to the browser on blocked 
requests.


Any idea?? Is there perhaps a good solution in the jsf 
framework??
___________________________________________________________
GRATIS für alle WEB.DE Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de