Package org.apache.wicket.validation.validator

Examples of org.apache.wicket.validation.validator.StringValidator


    submit.setEnabled(false);
    form.add(submit);
    final TextField<String> text = new TextField<>("text");
    form.add(text);
    text.setRequired(true);
    text.add(new StringValidator(4, null));
    text.add(new AjaxFormValidatingBehavior("keyup")
    {
      private static final long serialVersionUID = 1L;

      @Override
View Full Code Here


    FormComponent fc;

    // add form components to the form as usual

    fc = new RequiredTextField<String>("name");
    fc.add(new StringValidator(4, null));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));
View Full Code Here

   * Add the fields to the form
   */
  private void addFormFields() {

    RequiredTextField<String> login = new RequiredTextField<String>("login");
    login.add(new StringValidator(4, null));
    // login.setLabel(new Model<String>("testname"));
    add(login);

    passwordField = new PasswordTextField("password");
    add(passwordField);
View Full Code Here

    FormComponent fc;

    // add form components to the form as usual

    fc = new RequiredTextField<>("name");
    fc.add(new StringValidator(4, null));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));
View Full Code Here

      // Create a required text field with a max length of 30 characters
      // that edits the book's title
      final TextField<String> title = new TextField<>("title");
      title.setRequired(true);
      title.add(new StringValidator(null, 30));

      final MarkupContainer titleFeedback = new FormComponentFeedbackBorder("titleFeedback");
      add(titleFeedback);
      titleFeedback.add(title);
View Full Code Here

    FormComponent fc;

    // add form components to the form as usual

    fc = new RequiredTextField<String>("name");
    fc.add(new StringValidator(4, null));
    fc.setLabel(new ResourceModel("label.name"));

    form.add(fc);
    form.add(new SimpleFormComponentLabel("name-label", fc));
View Full Code Here

      super(s);
      setDefaultModel(new CompoundPropertyModel<Booking>(booking));

      TextField<String> name = new TextField<String>("partyDetails.name");
      name.setRequired(Boolean.TRUE);
      name.add(new StringValidator(1, 30));

      FormComponentFeedbackBorder nameBorder = new FormComponentFeedbackBorder("nameBorder");
      add(nameBorder);
      nameBorder.add(name);
    }
View Full Code Here

      // Create a required text field with a max length of 30 characters
      // that edits the book's title
      final TextField<String> title = new TextField<String>("title");
      title.setRequired(true);
      title.add(new StringValidator(null, 30));

      final MarkupContainer titleFeedback = new FormComponentFeedbackBorder("titleFeedback");
      add(titleFeedback);
      titleFeedback.add(title);
View Full Code Here

        }
        super.setObject(value);
      }
    });

    inputField.add(new StringValidator(3, 10));
    inputField.setRequired(true);
    form.add(inputField);

    // file upload
    form.add(new FileUploadField("fileUpload", new ListModel<FileUpload>()));
View Full Code Here

    submit.setOutputMarkupId(true);
    submit.setEnabled(false);
    form.add(submit);
    final TextField<String> text = new TextField<String>("text");
    text.setRequired(true);
    text.add(new StringValidator(4, null));
    text.add(new AjaxFormValidatingBehavior(form, "onkeyup")
    {
      private static final long serialVersionUID = 1L;

      @Override
View Full Code Here

TOP

Related Classes of org.apache.wicket.validation.validator.StringValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.