I have noticed that for the trunk branch everything said applies ditto
but the situation is even worse because onError has been made private.

I've added a JIRA fot this https://issues.apache.org/jira/browse/WICKET-452.

Cheers,
Carlos

On 4/7/07, Carlos Pita <[EMAIL PROTECTED]> wrote:
> I think it's right to have both. But imo it would be better if I don't
> have to "dummy out" the abstract onUpdate every time just to keep the
> compiler happy. And maybe if the extra onError parameter, which for
> validation purposes will always be a null exception, is not exposed to
> the event. What do you think about an empty default implementation for
> onUpdate and an overload for onError that just takes the target, these
> changes would be handy for the usual ajax-validation task.
>
> protected void onUpdate(AjaxRequestTarget target) { }
>
> protected void onError(AjaxRequestTarget target) { } <-- maybe
> onValidationError?
>
> protected void onError(AjaxRequestTarget target, RuntimeException e) {
>    throw e;
>  }
>
> Just my two cents.
>
> Regards,
> Carlos
>
> On 4/7/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > people have complained that onupdate() was being called even though there
> > was an error or validation failure.so i have added the onerror() method. if
> > you dont care then you can override onerror() and have it forward to your
> > onupdate()
> >
> > -igor
> >
> >
> >
> > On 4/7/07, Carlos Pita <[EMAIL PROTECTED]> wrote:
> > >
> > > Addenda et corrigenda:
> > >
> > > >   else
> > > >         formComponent.invalid();  <--- replace with
> > formComponent.valid(); in both cases
> > >
> > > Sorry,
> > > Carlos
> > >
> > >
> > > On 4/7/07, Carlos Pita < [EMAIL PROTECTED]> wrote:
> > > > Hi all,
> > > >
> > > > I'm not sure whether this is a bug or a feature of 1.3, but the
> > > > onUpdate event of AjaxFormComponentUpdatingBehavior is
> > not called upon
> > > > validation errors anymore. Here are the relevant "diffs" against 1.2
> > > > (simplified pseudocode):
> > > >
> > > > 1.3
> > > > -----
> > > >
> > > > protected final void onEvent(final AjaxRequestTarget target)
> > > > {
> > > >   formComponent.validate();
> > > >   if (formComponent.hasErrorMessage())
> > > >         formComponent.invalid();
> > > >         onError(target, null);
> > > >   else
> > > >         formComponent.invalid ();
> > > >         onUpdate(target);
> > > > }
> > > >
> > > > 1.2
> > > > -----
> > > >
> > > > protected final void onEvent(final AjaxRequestTarget target)
> > > > {
> > > >   formComponent.validate();
> > > >   if (formComponent.hasErrorMessage ())
> > > >         formComponent.invalid();
> > > >   else
> > > >         formComponent.invalid();
> > > >   onUpdate(target);
> > > > }
> > > >
> > > > If this is meant to be so I would have to override onError instead,
> > > > but that would be a bit laborious as it's necessary to override the
> > > > abstract onUpdate too, and there is no need of that nulled out
> > > > exception parameter either.
> > > >
> > > > Or should I use AjaxFormValidatingBehavior instead?
> > > >
> > > > Cheers,
> > > > Carlos
> > > >
> > >
> > >
> > -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your
> > > opinions on IT & business topics through brief surveys-and earn cash
> > >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to