Wicket Form validation on Ajax

By Java bug | March 16, 2009 | 2,154 views
Category Java

  Share


About author  I am Java professional, working on java and Portal technoglies from last 5 years. I start techartifact with my some friends to share our knowledge and tips with world. Read more from this author


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.

                @Override
protected void onError(AjaxRequestTarget target, Form form)
{
target.addComponent(feedback);
}

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

  • Delicious
  • Yahoo Buzz
  • Digg
  • DZone
  • Facebook
  • LinkedIn
  • Twitter
  • Share/Bookmark
Read more post on Java Wicket 

  Share

One comment | Add One

Comments

  1. rafalloNo Gravatar - 01/18/2010 at 9:36 am

    nice article. It helps me a lot.



Trackbacks

Leave a Comment

Name:

E-Mail :

Website :

Comments :