Example #1
0
 private void createMailInput(Form<T> form) {
   TextField<String> emailField = new TextField<String>("user.email");
   emailField.add(EmailAddressValidator.getInstance());
   emailField.add(new ValidatingFormComponentAjaxBehavior());
   form.add(emailField);
   form.add(new AjaxFormComponentFeedbackIndicator("emailValidationError", emailField));
 }
Example #2
0
  private void createNameInput(Form<T> form) {
    TextField<String> firstNameField = new TextField<String>("user.firstName");
    form.add(firstNameField);

    TextField<String> lastNameField = new RequiredTextField<String>("user.lastName");
    form.add(lastNameField);
    lastNameField.setLabel(new ResourceModel("admin.user.lastName"));
    lastNameField.add(new ValidatingFormComponentAjaxBehavior());
    form.add(new AjaxFormComponentFeedbackIndicator("lastNameValidationError", lastNameField));
  }