form.add(new SimpleFormComponentLabel("email-label", fc));
// attach an ajax validation behavior to all form component's keydown
// event and throttle it down to once per second
form.add(new AjaxFormValidatingBehavior("keydown", Duration.ONE_SECOND));
// add a button that can be used to submit the form via ajax
form.add(new AjaxButton("ajax-button", form)
{
@Override