Wicket Form validation on Ajax

Form validation in Wicket is very simple. Just add the feedback panel in your mark-up and put validation on your form fields.
Wicket form can be summited by Ajax too, but in that case validation become different.

Wicket Logo

Wicket Ajax is based on target rule, so need to pass on your request to next component. Same thing happen in case of form validation

If you need to do form Validation in Wicket Ajax form don’t forget to override “onError” in your form. Other wise Wicket will keep on giving the warining message
that Feedback panel not found.

protected void onError(AjaxRequestTarget target, Form form)

Above code will redirect the Ajax response to feedback panel to show Error messages.

Java bug

I am Java professional, working on Enterprise Java from last 8 years.

More Posts - Website

Follow Me: