On 9/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Apologies for reviving a dead thread, but I'm having the issues
> discussed below and don't entirely understand the proposed
> solutions.  In my case I have a form with multiple TextFields each of
> which is required.  Using the common suggestion of:
>
> AjaxFormValidatingBehavior.addToAllFormComponents(form,"onblur");
>
> The user is prompted with multiple required field errors when they
> tab out of the first required field.  This obviously isn't ideal as
> the user hasn't even had a chance to enter data in the other fields.
> This even happens using the form validation example straight out of
> the "Pro Wicket" book.
>
> I've got an AjaxFallbackButton mostly working to validate everything
> only when the form is submitted, but if the user gets an error and
> then submits the form again without fixing the error the form is
> submitted without validation.  I'm sure there is a bug in my code
> somewhere, but even if there is do I really need to write a half page
> of code to implement an AjaxFallbackButton for what would seem to be
> the most common use case (wanting to validate the entire form at once
> prior to submission)?
>
> I just feel like I'm missing the obvious one liner that will do this
> for me.  Can someone please point me to an example of validating
> multiple form fields using Ajax and wicket upon form submission?

Maybe what we should do is create an example for Wicket examples that
shows what most would agree is best practice here. It's definitively
not the idea that you have to write half a page of code to achieve
this, and it seems this issue regularly comes up.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to