} else {
messageId = DoubleRangeValidator.NOT_IN_RANGE_MESSAGE_ID;// What to use for that case ( no min/max set,
// validator always pass ).
}
} else if (component instanceof LengthValidator) {
LengthValidator validator = (LengthValidator) component;
if (validator.getMaximum() > 0) {
if (validator.getMinimum() > 0) {
messageId = DoubleRangeValidator.NOT_IN_RANGE_MESSAGE_ID;
} else {
messageId = LengthValidator.MAXIMUM_MESSAGE_ID;
}
} else if (validator.getMinimum() > 0) {
messageId = LengthValidator.MINIMUM_MESSAGE_ID;
} else {
messageId = DoubleRangeValidator.NOT_IN_RANGE_MESSAGE_ID;// What to use for that case ( no min/max set,
// validator always pass ).
}
} else if (component instanceof LongRangeValidator) {
LongRangeValidator validator = (LongRangeValidator) component;
if (validator.getMaximum() != LONG_RANGE_VALIDATOR_DEFAULTS.getMaximum()) {
if (validator.getMinimum() != LONG_RANGE_VALIDATOR_DEFAULTS.getMinimum()) {
messageId = DoubleRangeValidator.NOT_IN_RANGE_MESSAGE_ID;
} else {
messageId = LongRangeValidator.MAXIMUM_MESSAGE_ID;
}
} else if (validator.getMinimum() != LONG_RANGE_VALIDATOR_DEFAULTS.getMinimum()) {
messageId = LongRangeValidator.MINIMUM_MESSAGE_ID;
} else {
messageId = DoubleRangeValidator.NOT_IN_RANGE_MESSAGE_ID;// What to use for that case ( no min/max set,
// validator always pass ).
}