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

Reply via email to