From 42deec695ac418b04f601ed8c06bd603ca7f776f Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Sun, 8 Mar 2015 10:39:17 +0100 Subject: [PATCH] Oprava merge. --- .../requirement/TripRequirementService.java | 2 ++ .../TripRequirementServiceImpl.java | 24 +++++++++++++++---- .../ui/requirement/TripRequirementForm.java | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/main/java/info/bukova/isspst/services/requirement/TripRequirementService.java b/src/main/java/info/bukova/isspst/services/requirement/TripRequirementService.java index cd44cea2..e116f223 100644 --- a/src/main/java/info/bukova/isspst/services/requirement/TripRequirementService.java +++ b/src/main/java/info/bukova/isspst/services/requirement/TripRequirementService.java @@ -10,6 +10,8 @@ public interface TripRequirementService extends RequirementBaseService result = q.list(); + + if (result.size() > 0) { + return result.get(0); + } + + return null; + } + @Override @Transactional public List getBills(TripRequirement entity) { diff --git a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java index a38524d6..70b35615 100644 --- a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java +++ b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementForm.java @@ -26,7 +26,7 @@ import org.zkoss.zul.Window; import java.util.List; -public class TripRequirementForm extends FormViewModel { +public class TripRequirementForm extends FormWithUpload { @WireVariable private UserService userService;