From 1f1f0536751f130d30cbf547efba9f02c43a3c8f Mon Sep 17 00:00:00 2001 From: Franta Pribyl Date: Mon, 12 May 2014 08:36:00 +0200 Subject: [PATCH] =?UTF-8?q?P=C5=99id=C3=A1na=20agenda=20Budovy.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../info/bukova/isspst/dao/BuildingDao.java | 7 + .../bukova/isspst/dao/jpa/BuildingDaoJPA.java | 12 ++ .../info/bukova/isspst/data/Building.java | 121 ++++++++++++++++++ .../isspst/services/BuildingService.java | 7 + .../isspst/services/BuildingServiceImpl.java | 7 + .../info/bukova/isspst/ui/BuildingForm.java | 14 ++ .../info/bukova/isspst/ui/BuildingList.java | 21 +++ src/main/resources/hibernate.cfg.xml | 1 + .../webapp/WEB-INF/spring/root-context.xml | 4 +- src/main/webapp/WEB-INF/zk-label.properties | 21 +++ src/main/webapp/app/navigation.zul | 2 +- src/main/webapp/app/page.css | 28 +++- src/main/webapp/buildings/building.zul | 30 +++++ src/main/webapp/buildings/buildingForm.zul | 42 ++++++ src/main/webapp/buildings/index.zul | 10 ++ src/main/webapp/img/building.png | Bin 0 -> 5615 bytes 16 files changed, 320 insertions(+), 7 deletions(-) create mode 100644 src/main/java/info/bukova/isspst/dao/BuildingDao.java create mode 100644 src/main/java/info/bukova/isspst/dao/jpa/BuildingDaoJPA.java create mode 100644 src/main/java/info/bukova/isspst/data/Building.java create mode 100644 src/main/java/info/bukova/isspst/services/BuildingService.java create mode 100644 src/main/java/info/bukova/isspst/services/BuildingServiceImpl.java create mode 100644 src/main/java/info/bukova/isspst/ui/BuildingForm.java create mode 100644 src/main/java/info/bukova/isspst/ui/BuildingList.java create mode 100644 src/main/webapp/WEB-INF/zk-label.properties create mode 100644 src/main/webapp/buildings/building.zul create mode 100644 src/main/webapp/buildings/buildingForm.zul create mode 100644 src/main/webapp/buildings/index.zul create mode 100644 src/main/webapp/img/building.png diff --git a/src/main/java/info/bukova/isspst/dao/BuildingDao.java b/src/main/java/info/bukova/isspst/dao/BuildingDao.java new file mode 100644 index 00000000..85b20608 --- /dev/null +++ b/src/main/java/info/bukova/isspst/dao/BuildingDao.java @@ -0,0 +1,7 @@ +package info.bukova.isspst.dao; + +import info.bukova.isspst.data.Building; + +public interface BuildingDao extends BaseDao { + +} \ No newline at end of file diff --git a/src/main/java/info/bukova/isspst/dao/jpa/BuildingDaoJPA.java b/src/main/java/info/bukova/isspst/dao/jpa/BuildingDaoJPA.java new file mode 100644 index 00000000..46a84cfe --- /dev/null +++ b/src/main/java/info/bukova/isspst/dao/jpa/BuildingDaoJPA.java @@ -0,0 +1,12 @@ +package info.bukova.isspst.dao.jpa; + +import info.bukova.isspst.dao.BuildingDao; +import info.bukova.isspst.data.Building; + +public class BuildingDaoJPA extends BaseDaoJPA implements BuildingDao { + + @Override + public String getEntityName() { + return "Building"; + } +} diff --git a/src/main/java/info/bukova/isspst/data/Building.java b/src/main/java/info/bukova/isspst/data/Building.java new file mode 100644 index 00000000..254cabfb --- /dev/null +++ b/src/main/java/info/bukova/isspst/data/Building.java @@ -0,0 +1,121 @@ +package info.bukova.isspst.data; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name="BUILDING") +public class Building implements DataModel { + + @Id + @Column(name="ID") + @GeneratedValue + private int id; + + @Column(name="CODE", unique=true) + private String code; + + @Column(name="NAME") + private String name; + + @Column(name="DESCRIPTION") + private String description; + + /** + * @return the id + */ + public int getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(int id) { + this.id = id; + } + + /** + * @return the code + */ + public String getCode() { + return code; + } + + /** + * @param code the code to set + */ + public void setCode(String code) { + this.code = code; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + @Override + public void setCreated(Date created) { + // TODO Auto-generated method stub + + } + + @Override + public Date getCreated() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setModified(Date modified) { + // TODO Auto-generated method stub + + } + + @Override + public Date getModified() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isValid() { + // TODO Auto-generated method stub + return false; + } + + @Override + public void setValid(boolean valid) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/main/java/info/bukova/isspst/services/BuildingService.java b/src/main/java/info/bukova/isspst/services/BuildingService.java new file mode 100644 index 00000000..919c30d3 --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/BuildingService.java @@ -0,0 +1,7 @@ +package info.bukova.isspst.services; + +import info.bukova.isspst.data.Building; + +public interface BuildingService extends Service { + +} diff --git a/src/main/java/info/bukova/isspst/services/BuildingServiceImpl.java b/src/main/java/info/bukova/isspst/services/BuildingServiceImpl.java new file mode 100644 index 00000000..57abc7fe --- /dev/null +++ b/src/main/java/info/bukova/isspst/services/BuildingServiceImpl.java @@ -0,0 +1,7 @@ +package info.bukova.isspst.services; + +import info.bukova.isspst.data.Building; + +public class BuildingServiceImpl extends AbstractService implements BuildingService{ + +} diff --git a/src/main/java/info/bukova/isspst/ui/BuildingForm.java b/src/main/java/info/bukova/isspst/ui/BuildingForm.java new file mode 100644 index 00000000..8f2d0907 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/BuildingForm.java @@ -0,0 +1,14 @@ +package info.bukova.isspst.ui; + +import info.bukova.isspst.data.Building; + +import org.zkoss.bind.annotation.Init; + +public class BuildingForm extends FormViewModel { + + @Init(superclass = true) + public void init() { + + } + +} diff --git a/src/main/java/info/bukova/isspst/ui/BuildingList.java b/src/main/java/info/bukova/isspst/ui/BuildingList.java new file mode 100644 index 00000000..94ffe808 --- /dev/null +++ b/src/main/java/info/bukova/isspst/ui/BuildingList.java @@ -0,0 +1,21 @@ +package info.bukova.isspst.ui; + +import info.bukova.isspst.data.Building; +import info.bukova.isspst.services.BuildingService; + +import org.zkoss.bind.annotation.Init; +import org.zkoss.zk.ui.select.annotation.WireVariable; + +public class BuildingList extends ListViewModel { + + @WireVariable + private BuildingService buildingService; + + @Init + public void init() { + service = buildingService; + dataClass = Building.class; + formZul = "buildingForm.zul"; + } + +} diff --git a/src/main/resources/hibernate.cfg.xml b/src/main/resources/hibernate.cfg.xml index 76d3d2d2..848e7cb8 100644 --- a/src/main/resources/hibernate.cfg.xml +++ b/src/main/resources/hibernate.cfg.xml @@ -7,5 +7,6 @@ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/spring/root-context.xml b/src/main/webapp/WEB-INF/spring/root-context.xml index 39249fd2..2e95a6b7 100644 --- a/src/main/webapp/WEB-INF/spring/root-context.xml +++ b/src/main/webapp/WEB-INF/spring/root-context.xml @@ -89,12 +89,12 @@ - + - + diff --git a/src/main/webapp/WEB-INF/zk-label.properties b/src/main/webapp/WEB-INF/zk-label.properties new file mode 100644 index 00000000..a072d70c --- /dev/null +++ b/src/main/webapp/WEB-INF/zk-label.properties @@ -0,0 +1,21 @@ +# Default file +AgendaBuildings=Budovy + +BuildingsFormCode=Kód +BuildingsFormCodeConstr=Zadejte kód budovy... +BuildingsFormName=Název +BuildingsFormDescription=Popis + +BuildingsGridColumnCode=Kód +BuildingsGridColumnName=Název +BuildingsGridColumnDescription=Popis + +ButtonStorno=Storno +ButtonSave=Uložit + +FormBuilding=Budova + +ToolbarRecNew=Nový záznam +ToolbarRecEdit=Úprava aktuálního záznamu +ToolbarRecDelete=Odstranit aktuální záznam +ToolbarRecFilter=Filtr záznamů diff --git a/src/main/webapp/app/navigation.zul b/src/main/webapp/app/navigation.zul index 33b140ac..bf76c9fe 100644 --- a/src/main/webapp/app/navigation.zul +++ b/src/main/webapp/app/navigation.zul @@ -29,7 +29,7 @@ - + diff --git a/src/main/webapp/app/page.css b/src/main/webapp/app/page.css index 9996d2b4..2e9c8328 100644 --- a/src/main/webapp/app/page.css +++ b/src/main/webapp/app/page.css @@ -1,10 +1,15 @@ -body { +/*body { font-family: sans-serif; +}*/ + +#container { + min-height:100%; + position:relative; } #header{ width: auto; - height:70px; + height:40px; border: 1px solid #ccc; padding:10px; } @@ -23,15 +28,30 @@ body { #maincolumn{ padding:10px; + padding-bottom:20px; /* Height of the footer */ margin: 0px 0px 0px 160px; - border: 1px solid #ccc; } #footer{ clear:both; - width:auto; + position:absolute; + bottom:0; + width:100%; + height:20px; /* Height of the footer */ + border: 1px solid #ccc; } + +.form-caption { + --1overflow:hidden; + font-weight: bold; + font-size: 20px; +} +/*aaa*/ +.form-caption-content { + float:left; +} + /* a:link,a:visited { font-size: 12px; diff --git a/src/main/webapp/buildings/building.zul b/src/main/webapp/buildings/building.zul new file mode 100644 index 00000000..e34c7d24 --- /dev/null +++ b/src/main/webapp/buildings/building.zul @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/buildings/buildingForm.zul b/src/main/webapp/buildings/buildingForm.zul new file mode 100644 index 00000000..45fd5834 --- /dev/null +++ b/src/main/webapp/buildings/buildingForm.zul @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + ${labels.BuildingsFormCode} : + + + + + + ${labels.BuildingsFormName} : + + + + + + ${labels.BuildingsFormDescription} : + + + + + + + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/main/webapp/buildings/index.zul b/src/main/webapp/buildings/index.zul new file mode 100644 index 00000000..d0cb3c94 --- /dev/null +++ b/src/main/webapp/buildings/index.zul @@ -0,0 +1,10 @@ + + + + + String gridZul = "building.zul"; + + + + + \ No newline at end of file diff --git a/src/main/webapp/img/building.png b/src/main/webapp/img/building.png new file mode 100644 index 0000000000000000000000000000000000000000..95b75a95a98ff25f0b37bc5716a4e54ea536946f GIT binary patch literal 5615 zcmVEX>4Tx0C?J+Q+HUC_ZB|i_hk=OLfG)Jmu!ImA|tE_$Pihg5Rw34gb)%y#f69p zRumNxoJdu~g4GI0orvO~D7a@qiilc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