diff --git a/src/main/java/info/bukova/isspst/ui/requirement/RequirementSubpage.java b/src/main/java/info/bukova/isspst/ui/requirement/RequirementSubpage.java index bf6eee07..576ee5d5 100644 --- a/src/main/java/info/bukova/isspst/ui/requirement/RequirementSubpage.java +++ b/src/main/java/info/bukova/isspst/ui/requirement/RequirementSubpage.java @@ -9,22 +9,21 @@ import org.zkoss.bind.annotation.NotifyChange; public class RequirementSubpage extends ListViewModel { - protected RequirementBaseService reqService; - @SuppressWarnings("unchecked") - public void init() { - reqService = (RequirementBaseService) service; + private RequirementBaseService getReqService() + { + return (RequirementBaseService) service; } @Override protected void loadLazyData(T data) { - reqService.loadAuthItems(data); + this.getReqService().loadAuthItems(data); } @Command @NotifyChange("dataBean") public void approve() { - reqService.approve(getDataBean()); + this.getReqService().approve(getDataBean()); } @Override @@ -35,11 +34,9 @@ public class RequirementSubpage extends ListViewModel public boolean isCanApprove() { if (getDataBean() != null) { - return reqService.canApprove(getDataBean()); + return this.getReqService().canApprove(getDataBean()); } return false; } - - } diff --git a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementListAll.java b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementListAll.java index 0d1262ee..3d527af2 100644 --- a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementListAll.java +++ b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementListAll.java @@ -32,7 +32,6 @@ public class TripRequirementListAll extends RequirementSubpage allCentres = workgroupService.getCentres(); allWorkgroups = workgroupService.getWorkgroups(); - super.init(); } @Override diff --git a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementListCentre.java b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementListCentre.java index f8833c8a..2304a186 100644 --- a/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementListCentre.java +++ b/src/main/java/info/bukova/isspst/ui/requirement/TripRequirementListCentre.java @@ -33,7 +33,6 @@ public class TripRequirementListCentre extends RequirementSubpage