I haven't read the whole discussion so I might be missing something. But I, personally, find calling button's onSubmit before form's more intuitive.
-Matej On 3/25/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
+1 Eelco On 3/24/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > so should we change this in 1.3? > > -igor > > > On 2/15/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > I agree with it now too. A typical thing you want to do in a button is > > do a component replacement (at least, that's what we do often here) of > > a component above the form. The problem with buttons being called > > before the form's onSubmit is that then the component is already > > detached from the page. > > > > Eelco > > > > > > On 2/15/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: > > > i am going to resurrect this discussion again since we now have more > > > committers and none of you old ones have agreed with me before! i still > > > think this > > > is a good idea! > > > > > > the old thread can be seen here: > > > > > > > > http://www.nabble.com/form.onsubmit-vs-button.onsubmit-tf1977859.html#a5431105 > > > > > > -igor > > > > > > > > > ---------- Forwarded message ---------- > > > From: Igor Vaynberg <[EMAIL PROTECTED]> > > > Date: Jul 20, 2006 3:55 PM > > > Subject: form.onsubmit vs button.onsubmit > > > To: wicket-develop@lists.sourceforge.net > > > > > > i just noticed that we call button.onsubmit() /before/ form.onsubmit(), > > i > > > always believed this to be the other way around because that is more > > > intuitive - cascading onsubmit down the component hierarchy. is there a > > > reason why we do it "backwards"? > > > > > > i have also noticed a pattern where i group certain fields in a panel > > and > > > would like to let the panel also have an onsubmit() for processing. i > > was > > > thinking of implementing IFormSubmitAware { void onSubmit(); } and > > bubble > > > this down via a visitor in form.delegatesubmit() but of course with the > > > button getting called first it makes no sense. > > > > > > shall we reverse it in 2.0? should i put the iformsubmitaware into 2.0core? > > > > > > -Igor > > > > > >