as far as i can see it, no button is the submitting component in wicket 1.5 at this point, but the AjaxFormSubmitBehavior is. the actual button (and its own onSubmit) is overriden at
[...onEvent(...)...] getForm().getRootForm().onFormSubmitted(new IFormSubmitter() { public void onSubmit() { AjaxFormSubmitBehavior.this.onSubmit(target); } } [...] or not? -------- Original-Nachricht -------- > Datum: Thu, 22 Sep 2011 08:15:13 -0700 > Von: Igor Vaynberg <igor.vaynb...@gmail.com> > An: users@wicket.apache.org > Betreff: Re: onSubmit - Button vs AjaxButton > what else could be the submitting component but the button at that point? > > -igor > > On Thu, Sep 22, 2011 at 8:10 AM, Marcel Hoerr <marcel.ho...@gmx.de> wrote: > > as you debugged the code in AbstractDefaultAjaxBehavior. the actual call > hierachy is the following: > > > > - AbstractDefaultAjaxBehavior.onRequest > > -- AjaxEventBehavior.respond > > --- AjaxFormSubmitBehavior.onEvent > > > > the onEvent() method of the AjaxFormSubmitBehavior invokes in wicket 1.5 > no more the submitting component of the root form, but passes itself as > submitting component into the root form. > > > > code from wicket 1.4 > > @Override > > protected void onEvent(AjaxRequestTarget target) > > { > > getForm().getRootForm().onFormSubmitted(); > > [...] > > > > code from wicket 1.5 > > @Override > > protected void onEvent(final AjaxRequestTarget target) > > { > > getForm().getRootForm().onFormSubmitted(new IFormSubmitter() > > { > > public Form<?> getForm() > > { > > return AjaxFormSubmitBehavior.this.getForm(); > > } > > > > public boolean getDefaultFormProcessing() > > { > > return > AjaxFormSubmitBehavior.this.getDefaultProcessing(); > > } > > > > public void onSubmit() > > { > > AjaxFormSubmitBehavior.this.onSubmit(target); > > } > > > > public void onError() > > { > > AjaxFormSubmitBehavior.this.onError(target); > > } > > }); > > } > > > > -------- Original-Nachricht -------- > >> Datum: Thu, 22 Sep 2011 17:27:42 +0300 > >> Von: Martin Grigorov <mgrigo...@apache.org> > >> An: users@wicket.apache.org > >> Betreff: Re: onSubmit - Button vs AjaxButton > > > >> 1.5 code from > >> org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new > >> AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget): > >> > >> @Override > >> protected void onSubmit(AjaxRequestTarget target) > >> { > >> AjaxButton.this.onSubmit(target, AjaxButton.this.getForm()); > >> } > >> > >> What do you mean by that AjaxFormSubmitBehavior handles the event ? > >> > >> On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr <marcel.ho...@gmx.de> > wrote: > >> > i guess it is the change in the onEvent method of the > >> AjaxFormSubmitBehavior. > >> > > >> > in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires > >> its onSubmit (meaning the underlying button is the formsubmitter) and > handles > >> afterwards its own onSubmit. > >> > in wicket 1.5 the AjaxFormSubmitBehavior handles itself as > formsubmitter > >> and the underlying button gets never fired. > >> > > >> > -------- Original-Nachricht -------- > >> >> Datum: Thu, 22 Sep 2011 15:45:37 +0300 > >> >> Von: Martin Grigorov <mgrigo...@apache.org> > >> >> An: users@wicket.apache.org > >> >> Betreff: Re: onSubmit - Button vs AjaxButton > >> > > >> >> check whether onError() is called > >> >> > >> >> Or put a breakpoint in > >> >> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and > >> >> follow to see where it breaks. > >> >> > >> >> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr <marcel.ho...@gmx.de> > >> wrote: > >> >> > hey guys, > >> >> > > >> >> > i have a question regarding the onSubmit method in Button and > >> >> AjaxButton. we use an ajaxtified WizardButton > (AjaxFormSubmitBehaivor) > >> which works > >> >> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the > >> underlying > >> >> WizardButton is never been called. > >> >> > > >> >> > any hint appreciated. > >> >> > -- > >> >> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! > >> >> > Jetzt informieren: http://www.gmx.net/de/go/freephone > >> >> > > >> >> > > --------------------------------------------------------------------- > >> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> >> > For additional commands, e-mail: users-h...@wicket.apache.org > >> >> > > >> >> > > >> >> > >> >> > >> >> > >> >> -- > >> >> Martin Grigorov > >> >> jWeekend > >> >> Training, Consulting, Development > >> >> http://jWeekend.com > >> >> > >> >> > --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> >> For additional commands, e-mail: users-h...@wicket.apache.org > >> >> > >> > > >> > -- > >> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! > >> > Jetzt informieren: http://www.gmx.net/de/go/freephone > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> > For additional commands, e-mail: users-h...@wicket.apache.org > >> > > >> > > >> > >> > >> > >> -- > >> Martin Grigorov > >> jWeekend > >> Training, Consulting, Development > >> http://jWeekend.com > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > > > > -- > > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! > > Jetzt informieren: http://www.gmx.net/de/go/freephone > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org