Re: [Wicket-develop] Discussion: double submits

2006-04-24 Thread Igor Vaynberg
But  how are they handling the back button for this? Form submit -> back button -> Form submit.This should work i guess, or is this just also then illegal? Then we should make a behahaviour so that you can attach it to a form to make the form block double submits. I think going back and trying to s

Re: [Wicket-develop] Discussion: double submits

2006-04-24 Thread Johan Compagner
why not just use the token like everyone else is doing. have a uuid in session and one in a hidden input field. generate a new one on every new form submit and if show an error page if they dont match. But  how are they handling the back button for this?Form submit -> back button -> Form submit.Thi

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Juergen Donnerstag
Yes I agree. Frameworks in general and especially Wicket are about ease of use. If double-submit is a concern and if it is a hassle to re-implement it for each web app, than Wicket IMO should have a very simple solution which meet 90% of all use cases. Juergen On 4/24/06, Dirk Markert <[EMAIL PRO

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Dirk Markert
I think it is. The problem is so widespread and reoccuring (just have a look at the tapestry and struts user list) that it should be supported by the framework. Why not look at it as special kind of validation? The incoming double submitted form as a whole is valid or not. The application develope

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Nick Heudecker
I don't think it is.  On 4/23/06, Martijn Dashorst <[EMAIL PROTECTED]> wrote: I see a lot of possible solutions, but is this actually a framework concern?Martijn

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Martijn Dashorst
I see a lot of possible solutions, but is this actually a framework concern?MartijnOn 4/24/06, JasonB < [EMAIL PROTECTED]> wrote:Johan Compagner wrote:> the problem i see is how to really detect a double submit that we > don't want.Please forgive me if this is already in the framework and I just ha

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread JasonB
Johan Compagner wrote: the problem i see is how to really detect a double submit that we don't want. Please forgive me if this is already in the framework and I just haven't needed to look for it... In the case where the user submits twice quickly in succession, and the first submit is still

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Igor Vaynberg
lets not even bring ajax into this discussion because i dont see an easy way of making that work.why not just use the token like everyone else is doing. have a uuid in session and one in a hidden input field. generate a new one on every new form submit and if show an error page if they dont match.

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Ingram Chen
How about putting secondTimeWillReturnFalse() to first ? a=function() { secondTimeWillReturnFalse() ;  { .old script.};  } ;The function is used to gaurd any unwanted user request. If the developer enables this protection, user is not allowed to execute any logic twice, including both "clie

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Igor Vaynberg
what if old returns a value also? then it wont work.then you have to do something like a=function() { .old script.}; secodTimeWillReturnFalse(); }but then you have to make sure that this runs /after/ all the other attribute modifiers already did their bit. -IgorOn 4/23/06, Ingram Chen <[EMA

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Ingram Chen
onSubmit() is useful when you only have single submit button. But it does not workmultiple buttons with different behaviors.To overcome onSubmit() or onClick() that already defines inline, one may useregister event method, like: var old = (element.onclick) ? element.onclick : function () {};element

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Johan Compagner
hmm why do that in the onclick of a buttonWhat i should do is just a method in the onSubmit of a form secondTimeIWillReturnFalse()"the problem is that we can't add that always to the onSubmit because it could already be defined. johanOn 4/23/06, Ingram Chen <[EMAIL PROTECTED]> wrote: the techniques

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Ingram Chen
the techniques we used is from:http://willmaster.com/possibilities/archives/wmp20030805001.shtml On 4/23/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote: Could you please provide the _javascript_. ThanksJuergenOn 4/23/06, Ingram Chen <[EMAIL PROTECTED]> wrote:> In our company we rely on _javascrip

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Johan Compagner
i guess that _javascript_ could be added as a Behaviour to a Form.johanOn 4/23/06, Juergen Donnerstag < [EMAIL PROTECTED]> wrote:Could you please provide the _javascript_. Thanks JuergenOn 4/23/06, Ingram Chen <[EMAIL PROTECTED]> wrote:> In our company we rely on _javascript_ to prevent pressing su

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Juergen Donnerstag
Could you please provide the javascript. Thanks Juergen On 4/23/06, Ingram Chen <[EMAIL PROTECTED]> wrote: > In our company we rely on javascript to prevent pressing submit button > twice. > Besides prevent double submit, the javascript also disable all other > available buttons > in the page. Th

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Ingram Chen
In our company we rely on _javascript_ to prevent pressing submit button twice.Besides prevent double submit, the _javascript_ also disable all other available buttonsin the page. This shields the user accidently break first request. _javascript_ is not perfect, but quite useful in many situations

Re: [Wicket-develop] Discussion: double submits

2006-04-23 Thread Johan Compagner
the problem i see is how to really detect a double submit that we don't want.For example i do a submit.a new page is displayedthen i do backand submit again. That should be possible just fine.But it is pretty much the same thing as i don't wait for the new page and press submit twice fast before th

[Wicket-develop] Discussion: double submits

2006-04-23 Thread Martijn Dashorst
All,I have been contemplating this for a while, having it work in the background of my head. I think we might still have a problem with double submits.First of all, we have solved the problem of the backbutton that does perform a post request. That is not a problem anymore, and IMO solved elegantly