Package org.apache.wicket.validation.validator

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


   
    if(entity != null && entity.getId().longValue() != entityIdToIgnore) {
      error(validatable);
    }
   
    StringValidator a;
  }
View Full Code Here


   *
   * @return the requested <code>StringValidator</code>
   */
  public static StringValidator exactLength(final int length)
  {
    return new StringValidator(length, length)
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onComponentTag(Component component, ComponentTag tag)
View Full Code Here

   *
   * @return the requested <code>StringValidator</code>
   */
  public static StringValidator lengthBetween(int minimum, int maximum)
  {
    return new StringValidator(minimum, maximum)
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onComponentTag(Component component, ComponentTag tag)
View Full Code Here

   *
   * @return the requested <code>StringValidator</code>
   */
  public static StringValidator maximumLength(int maximum)
  {
    return new StringValidator(null, maximum)
    {
      private static final long serialVersionUID = 1L;

      @Override
      public void onComponentTag(Component component, ComponentTag tag)
View Full Code Here

    add(form);

    form.add(newRequiredTextField("firstname", 32));
    form.add(newRequiredTextField("lastname", 32));
    form.add(newRequiredTextField("phone", 16));
    form.add(new TextField<String>("email").add(new StringValidator(null, 128)).add(
      EmailAddressValidator.getInstance()));
    form.add(new CancelButton());
    form.add(new SaveButton());
  }
View Full Code Here

  }

  private RequiredTextField<String> newRequiredTextField(String id, int maxLenght)
  {
    RequiredTextField<String> textField = new RequiredTextField<String>(id);
    textField.add(new StringValidator(null, maxLenght));
    return textField;
  }
View Full Code Here

        add(form);
       
        TextField<String> nameTextField = new TextField<String>("name");
        nameTextField.setRequired(true);
        nameTextField.add(new XMLNameValidator());
        nameTextField.add(new StringValidator() {
           
            @Override
            protected void onValidate(IValidatable<String> validatable) {
                if(CatalogImpl.DEFAULT.equals(validatable.getValue())) {
                    error(validatable, "defaultWsError");
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.