>From what I can see AjaxFormComponentUpdateingBehaviour does not help.

It appears that the only way to do this is to not use component validation but 
to write my own validation in the submit processing code.

Not the most maintainable of solutions :(


Ian

----- Original Message ----
From: Gerolf Seitz <[EMAIL PROTECTED]>
To: users@wicket.apache.org
Sent: Sunday, 26 August, 2007 6:05:00 PM
Subject: Re: AJAX form submit and validation

have you tried AjaxFormComponentUpdatingBehavior?

  gerolf

On 8/26/07, Ian Godman <[EMAIL PROTECTED]> wrote:
>
> Thanks but this does not solve my problem.
>
> I am submitting the form via ajax using an AjaxSubmitLink. If the form has
> errors on it then I do not get the submit, if the form has no errors then
> the submit code runs ok. The errors are not displayed.
>
> If I add a AjaxFormValidatingBehavior for the onblur event then I can see
> the errors but they check for required fields etc as soon as the first field
> is left therefore displaying errors too soon.
>
> With the AjaxFormValidatingBehavior set to onsubmit event I get no error
> reporting and no submit.
>
> I need to validate the entire form only when submit button is pressed
> pressed. One possibility is to do the validation "by hand" in the submit
> processing code.
>
>
> Ian
>
>
> ----- Original Message ----
> From: Gerolf Seitz <[EMAIL PROTECTED]>
> To: users@wicket.apache.org
> Sent: Sunday, 26 August, 2007 2:10:01 PM
> Subject: Re: AJAX form submit and validation
>
> concerning "one field depends on another":
> have you already taken a look at
>
> http://cwiki.apache.org/confluence/display/WICKET/Validating+related+fields
> ?
> the code is still 1.2, but it should get you started.
>
> hth,
>   gerolf
>
> On 8/26/07, Ian Godman <[EMAIL PROTECTED]> wrote:
> >
> > Hi
> >
> > I have a form that is submitted by ajax.
> >
> > I have validation on fields of the form.
> >
> > Using AjaxFormValidatingBehavior the form will be validated and error
> > messages displayed when the onblur event is used.
> >
> > However this is not what I need as the validation of one field depends
> on
> > another. I have tried to set the AjaxFormValidatingBehavior to onsubmit
> but
> > it appears that if the form is invalid then its not submitted so no
> errors
> > are displayed.
> >
> > Is there any way I can validate my form using ajax only when it is
> > submited ?
> >
> >
> > Ian
> >
> >
> >
> >
> >       ___________________________________________________________
> > Yahoo! Answers - Got a question? Someone out there knows the answer. Try
> > it
> > now.
> > http://uk.answers.yahoo.com/
>
>
>
>
>
>
>
>       ___________________________________________________________
> Want ideas for reducing your carbon footprint? Visit Yahoo! For Good
> http://uk.promotions.yahoo.com/forgood/environment.html







      ___________________________________________________________ 
Want ideas for reducing your carbon footprint? Visit Yahoo! For Good  
http://uk.promotions.yahoo.com/forgood/environment.html

Reply via email to