From 1acb724c3f28662404d3e3975071b56ddc2afa31 Mon Sep 17 00:00:00 2001 From: Franta Pribyl Date: Wed, 16 Jul 2014 14:03:32 +0200 Subject: [PATCH] =?UTF-8?q?Nastaven=C3=AD=20typu=20po=C5=BEadavku.=20Oprav?= =?UTF-8?q?a=20formu=20U=C5=BEivatele.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/requirement/RequirementServiceImpl.java | 8 ++++++++ src/main/webapp/admin/users/userForm.zul | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java b/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java index ba5fad99..944207c5 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java +++ b/src/main/java/info/bukova/isspst/services/requirement/RequirementServiceImpl.java @@ -1,21 +1,29 @@ package info.bukova.isspst.services.requirement; +import info.bukova.isspst.Constants; import info.bukova.isspst.data.Requirement; +import info.bukova.isspst.data.RequirementState; import info.bukova.isspst.services.AbstractOwnedService; import java.util.Date; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; public class RequirementServiceImpl extends AbstractOwnedService implements RequirementService, RequirementBaseService { + @Autowired + private RequirementTypeService reqTypeService; + @Override protected Requirement createEntity() { Requirement entity = new Requirement(); entity.setReqDate(new Date()); + entity.setType(reqTypeService.getTypeById(Constants.REQTYPE_ORDER)); + entity.setState(RequirementState.NEW); return entity; } diff --git a/src/main/webapp/admin/users/userForm.zul b/src/main/webapp/admin/users/userForm.zul index 0f2f1368..d35ad21f 100644 --- a/src/main/webapp/admin/users/userForm.zul +++ b/src/main/webapp/admin/users/userForm.zul @@ -25,7 +25,7 @@