Skip to content

Instantly share code, notes, and snippets.

View senthilmuthiah's full-sized avatar

senthilmuthiah

View GitHub Profile
package demo;
import java.util.List;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.*;
import org.zkoss.zul.*;
<?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
package zkCommon.zkSpringJPA;
import java.util.List;
import org.zkoss.bind.annotation.AfterCompose;
import org.zkoss.bind.annotation.ContextParam;
import org.zkoss.bind.annotation.ContextType;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.select.Selectors;
import org.zkoss.zk.ui.select.annotation.VariableResolver;
import org.zkoss.zk.ui.select.annotation.WireVariable;
@senthilmuthiah
senthilmuthiah / ParentWindow.zul
Created January 31, 2013 14:28
ParentWindow.zul
<?page title="Parent Window" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Parent Window" border="normal">
<label value="First Name"></label>
<separator></separator>
<textbox></textbox>
<separator></separator>
<label value="Last Name"></label>
<separator></separator>
<textbox></textbox>
<?page title="Child Window" contentType="text/html;charset=UTF-8"?>
<zk>
<window title="Child Window" border="normal" mode="modal" width="20%">
<label value="First Name"></label>
<separator></separator>
<textbox></textbox>
<separator></separator>
<label value="Last Name"></label>
<separator></separator>
<textbox></textbox>
package org.com.demo;
import java.util.HashMap;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.select.SelectorComposer;
import org.zkoss.zk.ui.select.annotation.Listen;
import org.zkoss.zk.ui.select.annotation.Wire;
import org.zkoss.zul.Textbox;
import org.zkoss.zul.Window;
<?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>
<?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>
<?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" />
@senthilmuthiah
senthilmuthiah / POM File
Created March 25, 2013 10:04
Address Book Using JPA +ZK + Spring.
<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>