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
Wicket-user@lists.sourceforge.net
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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to