[Bug #1132] Fix problem with CalendarExceptionType without name
Added constraint in both zul file and entity FEA: ItEr75S04BugFixing
This commit is contained in:
parent
71fa130612
commit
1aeacfbf63
2 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
<textbox id="tbName"
|
||||
value="@{controller.exceptionDayType.name}"
|
||||
width="300px"
|
||||
constraint="no empty:${i18n:_('cannot be null or empty')}"
|
||||
onBlur="controller.updateWindowTitle()" />
|
||||
</row>
|
||||
<row>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue