From 1aeacfbf63ddc9ef8434871f77bc5734c1cc8d3d Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Thu, 4 Aug 2011 12:59:13 +0200 Subject: [PATCH] [Bug #1132] Fix problem with CalendarExceptionType without name Added constraint in both zul file and entity FEA: ItEr75S04BugFixing --- .../business/calendars/entities/CalendarExceptionType.java | 2 ++ .../src/main/webapp/excetiondays/_editExceptionDayType.zul | 1 + 2 files changed, 3 insertions(+) diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/calendars/entities/CalendarExceptionType.java b/navalplanner-business/src/main/java/org/navalplanner/business/calendars/entities/CalendarExceptionType.java index fe38f6c73..060c9eba2 100644 --- a/navalplanner-business/src/main/java/org/navalplanner/business/calendars/entities/CalendarExceptionType.java +++ b/navalplanner-business/src/main/java/org/navalplanner/business/calendars/entities/CalendarExceptionType.java @@ -30,6 +30,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.Validate; import org.hibernate.NonUniqueResultException; import org.hibernate.validator.AssertTrue; +import org.hibernate.validator.NotEmpty; import org.hibernate.validator.NotNull; import org.navalplanner.business.calendars.daos.ICalendarExceptionTypeDAO; import org.navalplanner.business.common.IHumanIdentifiable; @@ -93,6 +94,7 @@ public class CalendarExceptionType extends IntegrationEntity implements .isTrue(notOverAssignable)); } + @NotEmpty(message = "name not specified") public String getName() { return name; } diff --git a/navalplanner-webapp/src/main/webapp/excetiondays/_editExceptionDayType.zul b/navalplanner-webapp/src/main/webapp/excetiondays/_editExceptionDayType.zul index e3d2160b0..a6875faa2 100644 --- a/navalplanner-webapp/src/main/webapp/excetiondays/_editExceptionDayType.zul +++ b/navalplanner-webapp/src/main/webapp/excetiondays/_editExceptionDayType.zul @@ -50,6 +50,7 @@