Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #333
| From | "Lew" <lew@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: Preventing duplicate |
| Message-ID | <r9idnRXamfAnWejYnZ2dnUVZ_u2dnZ2d@comcast.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <ykA1h.9648$HY5.1983@trnddc06> |
| Date | 2011-04-27 15:26 +0000 |
| Organization | TDS.net |
To: comp.lang.java,comp.lang. (f-u set to clj.programmer) Oleg Konovalov wrote: > Hi, > > I have a Java/JavaScript GUI application where I perform a lot of long DB > operations > [e.g. massive SQL Insert's], which takes 5-60 secs to perform. > Sometimes user double-clicks the button or just gets impatient and clicks > again, > which created duplicate forcm submission and hence duplicate records. > So I am trying to disable the button as soon as it is clicked, and as soon > as it's done, > re-enable it again. Trying to disable a browser control (back button, refresh) from the server is wrong and fraught with difficulty. Make your transactions idempotent and stop trying to screw up people's browsers. Another poster already referred you to the Token pattern. It is a solution. - Lew --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next | Find similar
Re: Preventing duplicate "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:26 +0000
csiph-web