.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);