Přidána agenda Budovy.
parent
8939b24ff1
commit
1f1f053675
@ -0,0 +1,7 @@
|
||||
package info.bukova.isspst.dao;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
public interface BuildingDao extends BaseDao<Building> {
|
||||
|
||||
}
|
@ -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<Building> implements BuildingDao {
|
||||
|
||||
@Override
|
||||
public String getEntityName() {
|
||||
return "Building";
|
||||
}
|
||||
}
|
@ -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
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package info.bukova.isspst.services;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
public interface BuildingService extends Service<Building> {
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package info.bukova.isspst.services;
|
||||
|
||||
import info.bukova.isspst.data.Building;
|
||||
|
||||
public class BuildingServiceImpl extends AbstractService<Building> implements BuildingService{
|
||||
|
||||
}
|
@ -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<Building> {
|
||||
|
||||
@Init(superclass = true)
|
||||
public void init() {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -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<Building> {
|
||||
|
||||
@WireVariable
|
||||
private BuildingService buildingService;
|
||||
|
||||
@Init
|
||||
public void init() {
|
||||
service = buildingService;
|
||||
dataClass = Building.class;
|
||||
formZul = "buildingForm.zul";
|
||||
}
|
||||
|
||||
}
|
@ -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ů
|
@ -0,0 +1,30 @@
|
||||
<?page title="${labels.AgendaBuildings}" contentType="text/html;charset=UTF-8"?>
|
||||
<zk>
|
||||
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||
<window title="${labels.AgendaBuildings}" border="normal" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingList')">
|
||||
|
||||
<toolbar>
|
||||
<toolbarbutton image="/img/add.png" tooltiptext="${labels.ToolbarRecNew}" id="btnNew" onClick="@command('addNew')" disabled="@load(vm.filter)" />
|
||||
<toolbarbutton image="/img/edit.png" tooltiptext="${labels.ToolbarRecEdit}" id="btnEdit" onClick="@command('edit')" disabled="@load(empty vm.dataBean ? 'true' : 'false')" />
|
||||
<toolbarbutton image="/img/delete.png" tooltiptext="${labels.ToolbarRecDelete}" id="btnDelete" onClick="@command('delObject')" disabled="@load(empty vm.dataBean ? 'true' : 'false')" />
|
||||
<toolbarbutton image="/img/funnel.png" tooltiptext="${labels.ToolbarRecFilter}" id="btnFilter" onClick="@command('filter')" />
|
||||
</toolbar>
|
||||
|
||||
|
||||
<listbox model="@load(vm.dataList)" selectedItem="@bind(vm.dataBean)">
|
||||
<listhead>
|
||||
<listheader label="${labels.BuildingsGridColumnCode}" width="10%" />
|
||||
<listheader label="${labels.BuildingsGridColumnName}" width="30%" />
|
||||
<listheader label="${labels.BuildingsGridColumnDescription}" width="60%" />
|
||||
</listhead>
|
||||
<template name="model">
|
||||
<listitem>
|
||||
<listcell label="@load(each.code)" />
|
||||
<listcell label="@load(each.name)" />
|
||||
<listcell label="@load(each.description)" />
|
||||
</listitem>
|
||||
</template>
|
||||
</listbox>
|
||||
|
||||
</window>
|
||||
</zk>
|
@ -0,0 +1,42 @@
|
||||
<?page title="${labels.AgendaBuildings}" contentType="text/html;charset=UTF-8"?>
|
||||
<!--?link rel="stylesheet" type="text/css" href="/app/page.css"?-->
|
||||
<zk>
|
||||
<window id="editWin" closable="true" border="normal" position="center" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('info.bukova.isspst.ui.BuildingForm')">
|
||||
<caption src="/img/building.png" zclass="form-caption" label="${labels.FormBuilding}" />
|
||||
<vlayout>
|
||||
<grid hflex="min">
|
||||
<columns>
|
||||
<column align="right" hflex="min" />
|
||||
<column />
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<cell sclass="row-title">${labels.BuildingsFormCode} :</cell>
|
||||
<cell>
|
||||
<textbox constraint="no empty: ${labels.BuildingsFormCodeConstr}" width="200px" value="@bind(vm.dataBean.code)" />
|
||||
</cell>
|
||||
</row>
|
||||
<row>
|
||||
<cell sclass="row-title">${labels.BuildingsFormName} :</cell>
|
||||
<cell>
|
||||
<textbox width="200px" value="@bind(vm.dataBean.name)" />
|
||||
</cell>
|
||||
</row>
|
||||
<row>
|
||||
<cell sclass="row-title">${labels.BuildingsFormDescription} :</cell>
|
||||
<cell>
|
||||
<textbox width="300px" value="@bind(vm.dataBean.description)" />
|
||||
</cell>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<hlayout>
|
||||
<div hflex="1"></div>
|
||||
<div>
|
||||
<button label="${labels.ButtonStorno}" onClick="editWin.detach();"/>
|
||||
<button label="${labels.ButtonSave}" onClick="@command('save', window=editWin)"/>
|
||||
</div>
|
||||
</hlayout>
|
||||
</vlayout>
|
||||
</window>
|
||||
</zk>
|
@ -0,0 +1,10 @@
|
||||
<?page title="${labels.agenda.buildings}" contentType="text/html;charset=UTF-8"?>
|
||||
<zk>
|
||||
|
||||
<zscript>
|
||||
String gridZul = "building.zul";
|
||||
</zscript>
|
||||
|
||||
<include src="/app/template.zhtml"/>
|
||||
|
||||
</zk>
|
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
Loading…
Reference in New Issue