Package eu.maydu.gwt.validation.client.validators.datetime

Examples of eu.maydu.gwt.validation.client.validators.datetime.LocalizedDateValidator


          .addActionForFailure(focusAction)
          .addActionForFailure(new StyleAction("validationFailedBorder"))
    );
   
    validator.addValidators("localizedDate",
        new LocalizedDateValidator(localizedDateTextBox, DateTimeFormat.getShortDateFormat(), false)
          .addActionForFailure(focusAction)
          .addActionForFailure(new StyleAction("validationFailedBorder"))
      );
   
    popupDesc.addDescription("localizedDate.description", localizedDateTextBox);
   
    validator.addValidators("name",
        new NameValidator(nameValidatorTextBox)
          .addActionForFailure(focusAction)
          .addActionForFailure(new StyleAction("validationFailedBorder"))
    );
   
    popupDesc.addDescription("name.description", nameValidatorTextBox);
   
    popupDesc.addDescription("notEmptyHelp", notEmptyTextBox);

    RegularExpressionValidator regex = new RegularExpressionValidator(regexValidateEntryTextBox, new ValidatorConfigurationSource<String>() {

      public String getConfigurationValue() {
        String regex = regexEntryTextBox.getText();
        if(regex.trim().equals("")) {
          regexEntryTextBox.setText("(a|b)*");
          return "(a|b)*";
        }
       
        return regex;
      }
     
    }, "regexNotMatched");
   
    validator.addValidators("enterRegExedText", regex
      .addActionForFailure(new StyleAction("validationFailedBorder"))
      .addActionForFailure(focusAction)
    );
   
    popupDesc.addDescription("regexText.description", regexValidateEntryTextBox);
   
    validator.addValidators("localizedDate",
        new LocalizedDateValidator(localizedDateTextBox, DateTimeFormat.getShortDateFormat(), false)
          .addActionForFailure(focusAction)
          .addActionForFailure(new StyleAction("validationFailedBorder"))
      );
   
    popupDesc.addDescription("localizedDate.description", localizedDateTextBox);
View Full Code Here

TOP

Related Classes of eu.maydu.gwt.validation.client.validators.datetime.LocalizedDateValidator

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.