Created
March 25, 2013 10:48
-
-
Save senthilmuthiah/5236326 to your computer and use it in GitHub Desktop.
Address Book Using JPA +ZK + Spring.
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="Address List" contentType="text/html;charset=UTF-8"?> | |
<zk> | |
<window id="addressList" border="none" | |
apply="org.zkoss.bind.BindComposer" | |
viewModel="@id('vm') @init('zkoss.vm.AddressListVM')"> | |
<separator /> | |
<separator /> | |
<div width="100%"> | |
<div sclass="sectionTitle"> | |
<separator /> | |
<label value="Address Book" sclass="sectionTitleLabel" /> | |
<separator /> | |
</div> | |
<div style="float:right"> | |
<button label="Add New" onClick="@command('onAddNew')" | |
mold="trendy" sclass="mybutton button blue small" /> | |
</div> | |
<div style="clear: both;"></div> | |
<div sclass="sectionSeperator"></div> | |
</div> | |
<separator /> | |
<listbox id="" mold="paging" pageSize="11" pagingPosition="top" | |
sclass="mylist" selectedItem="@bind(vm.selectedItem)" | |
model="@load(vm.dataSet)"> | |
<listhead sizable="true"> | |
<listheader label="Full Name" sortDirection="ascending" | |
sort="auto(fullName)" /> | |
<listheader label="Email" sort="auto(email)" /> | |
<listheader label="Mobile" sort="auto(mobile)" /> | |
<listheader label="Action" /> | |
</listhead> | |
<template name="model" var="p1"> | |
<listitem> | |
<listcell label="@load(p1.fullName)" /> | |
<listcell label="@load(p1.email)" /> | |
<listcell label="@load(p1.mobile)" /> | |
<listcell> | |
<hbox spacing="20px"> | |
<image | |
onClick="@command('onEdit',addressRecord=p1)" | |
sclass="fimageedit"> | |
</image> | |
<image | |
onClick="@command('openAsReadOnly',addressRecord=p1)" | |
sclass="fimageView"> | |
</image> | |
<image | |
onClick="@command('onDelete',addressRecord=p1)" | |
sclass="fimageDelete"> | |
</image> | |
</hbox> | |
</listcell> | |
</listitem> | |
</template> | |
</listbox> | |
</window> | |
</zk> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment