Hi,

Wicket IValidator is used before converting the string sent by the browser
to a domain object. This way if there is a validation error the old (and
correct) value is still in use.
You can achieve your approach by making your validation in #onSubmit().
Here you can work with the domain object but if there is a validation error
then you need to restore the form components' models to the previous
(correct) ones, not only skip the write to the DB.


On Mon, Dec 17, 2012 at 9:07 AM, wicket_new_user <[email protected]>wrote:

> Hi all,
>
> Is there a way to do the validation for all the fields in one area without
> using onValidate method.
>
> I mean, the form data will be converted to domain data, do the validation
> and throw error message if any found before persisting to the database?
>
> Thank You
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Custom-Validation-implementation-tp4654851.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>

Reply via email to