This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package addressbook.dao; | |
import java.util.List; | |
public interface CRUDDao { | |
<T> List<T> getAll(Class<T> klass); | |
<T> T save(T t); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package addressbook.service; | |
import java.util.List; | |
public interface CRUDService { | |
<T> List<T> getAll(Class<T> klass); | |
<T> T save(T t); | |
<T> void delete(T t); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package addressbook.dao; | |
import java.util.List; | |
import javax.persistence.EntityManager; | |
import javax.persistence.PersistenceContext; | |
import javax.persistence.PersistenceContextType; | |
import org.springframework.stereotype.Repository; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> | |
<description><![CDATA[My ZK Application]]></description> | |
<display-name>AddressBook</display-name> | |
<context-param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" | |
xsi:schemaLocation=" | |
http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | |
http://www.springframework.org/schema/context | |
http://www.springframework.org/schema/context/spring-context-3.0.xsd | |
http://www.springframework.org/schema/tx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
version="2.0"> | |
<persistence-unit name="ZKExamples" > | |
<provider>org.hibernate.ejb.HibernatePersistence</provider> | |
<properties> | |
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/> | |
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" /> | |
<property name="hibernate.connection.username" value="root" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>AddressBook</groupId> | |
<artifactId>AddressBook</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<properties> | |
<zk.version>6.5.1</zk.version> | |
<commons-io>1.3.1</commons-io> | |
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?page title="Schools" contentType="text/html;charset=UTF-8"?> | |
<zk> | |
<window id="winEditor" title="School Editor" border="normal" | |
height="350px" width="400px" closable="true" | |
apply="org.zkoss.bind.BindComposer" | |
viewModel="@id('vm') @init('org.com.demo.ChildSchoolsEditVM')"> | |
<vlayout> | |
<toolbar> | |
<toolbarbutton id="tbtnSave" label="Save" | |
onClick="@command('saveSchool')" image="/images/16_save.png" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="childwindow" ?> | |
<?page title="Child Window" contentType="text/html;charset=UTF-8"?> | |
<zk> | |
<window id="childwindow" title="Child Window" border="normal" | |
mode="modal" width="30%" apply="org.com.demo.ChildWindowController"> | |
<label value="Change the first name and Last name and click the button close to return the values"></label> | |
<separator></separator> | |
<label value="First Name"></label> | |
<separator></separator> | |
<textbox id="firstName" value="@{childwindow$ChildWindowController.firstName}"></textbox> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?page title="Child Window" contentType="text/html;charset=UTF-8"?> | |
<zk> | |
<window id="childwindow" title="Child Window" border="normal" mode="modal" width="20%"> | |
<label value="First Name"></label> | |
<separator></separator> | |
<textbox value="${arg.firstName}"></textbox> | |
<separator></separator> | |
<label value="Last Name"></label> | |
<separator></separator> | |
<textbox value="${arg.lastName}"></textbox> |