Change validation messages in material units editing window

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-07-17 11:07:57 +02:00
parent 7a85e0ee56
commit 1900a39a0e

View file

@ -125,9 +125,7 @@ public class UnitTypeController extends BaseCRUDController<UnitType> {
public void validate(Component comp, Object value) { public void validate(Component comp, Object value) {
String strValue = (String) value; String strValue = (String) value;
if (StringUtils.isBlank(strValue)) { if (StringUtils.isBlank(strValue)) {
throw new WrongValueException(comp, throw new WrongValueException(comp, _("cannot be empty"));
_("Unit Type name cannot be empty")
);
} }
if (unitTypeModel.existsAnotherUnitTypeWithName(strValue)) { if (unitTypeModel.existsAnotherUnitTypeWithName(strValue)) {
@ -147,8 +145,7 @@ public class UnitTypeController extends BaseCRUDController<UnitType> {
public void validate(Component comp, Object value) { public void validate(Component comp, Object value) {
String strValue = (String) value; String strValue = (String) value;
if (StringUtils.isBlank(strValue)) { if (StringUtils.isBlank(strValue)) {
throw new WrongValueException(comp, throw new WrongValueException(comp, _("cannot be empty"));
_("Unit type code cannot be empty"));
} }
if (unitTypeModel.existsAnotherUnitTypeWithCode(strValue)) { if (unitTypeModel.existsAnotherUnitTypeWithCode(strValue)) {