Suggested case list:
Using timer to refresh a grid
383guest172.69.33.12125nk0uiMay 7, 2020 7:23:47 AMlinkuser model to move item to another listbox
120guest162.158.193.148d0n3krApr 2, 2020 5:28:28 AMlinkDisabled list item row passed to VM-1981
296fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:44 PMlinkDisabled list item row passed to VM-1981
295fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:16 PMlinkDisabled list item row passed to VM-1981
294fatih123160.83.36.13225nk0uiFeb 13, 2018 3:30:44 PMlinkgrid sample with ListModel/RowRenderer
816guest80.82.2.1312vah9ajFeb 21, 2017 11:42:21 AMlinkgrid sample with ListModel/RowRenderer
809guest175.98.113.1622vah9ajJan 26, 2017 9:19:33 AMlinkgrid sample with ListModel/RowRenderer
196guest79.185.142.402vah9ajApr 26, 2014 10:53:57 PMlinkgrid sample with ListModel/RowRenderer
195guest79.185.142.402vah9ajApr 26, 2014 10:53:54 PMlinkgrid sample with ListModel/RowRenderer
194guest79.185.142.402vah9ajApr 26, 2014 10:53:51 PMlinkgrid sample with ListModel/RowRenderer
193guest79.185.142.402vah9ajApr 26, 2014 10:53:48 PMlinkgrid sample with ListModel/RowRenderer
192guest79.185.142.402vah9ajApr 26, 2014 10:53:44 PMlinkgrid sample with ListModel/RowRenderer
191guest79.185.142.402vah9ajApr 26, 2014 10:53:40 PMlinkHierarchy table without using ZK PE/EE
1aaknai151.28.135.2131s871daJul 29, 2013 11:02:46 PMlinkgrid sample with ListModel/RowRenderer
128aaknai151.28.135.2132vah9ajJul 29, 2013 7:20:00 PMlinkuser model to move item to another listbox
1TonyQ114.25.109.94d0n3krApr 21, 2012 10:43:27 AMlinkUsing timer to refresh a grid
1TonyQ220.133.44.3725nk0uiFeb 17, 2012 3:17:34 AMlinkFire a event from child iframe
1TonyQ220.133.44.372eupjotFeb 3, 2012 5:04:52 AMlinkTextbox input restriction sample
1TonyQ72.21.245.2431b3nlr0Dec 20, 2011 10:09:10 AMlinkTest web core taglib in ZUL
1TonyQ198.203.175.175ofqkemDec 17, 2011 3:36:08 AMlinkLatest 10 Fiddles :
Another new ZK fiddle
1kevinLin172.69.34.101uupv7Mar 31, 2025 7:11:56 AMlinkAnother new ZK fiddle
1guest172.70.240.35tj4s9vMar 29, 2025 2:17:44 PMlinkmulti-radio-vm
1guest172.68.23.1021oqiv7vMar 28, 2025 3:07:56 PMlinkAnother new ZK fiddle
1guest162.158.167.223e3ttrMar 28, 2025 2:12:51 PMlinkZK-5889
1JamesChu172.70.206.333hp69vcMar 28, 2025 7:41:45 AMlinkhbox align center
1guest172.68.225.1711b2t23uMar 28, 2025 3:20:51 AMlinkhbox align center
50guest172.68.225.1703712kl1Mar 28, 2025 3:20:34 AMlinkhbox align center
49guest172.71.210.243712kl1Mar 28, 2025 3:02:31 AMlinkZK Menu CSS
1guest172.69.68.58323e3b3Mar 27, 2025 1:35:24 PMlinkBorderlayout example
17guest162.158.94.1171c9p06gMar 27, 2025 12:31:08 PMlinkZK-5889
1JamesChu172.70.206.333hp69vcMar 28, 2025 7:41:45 AMlinkresources
index.zulzul<zk>
<div viewModel="@id('vm') @init('pkg$.B102_ZK_5889ViewModel')">
<div form="@id('fx') @load(vm.myPojo) @load(vm.myPojo, after='cancel') @save(vm.myPojo, before='save')">
<div>
origin ->
<label value="@init(vm.myPojo)"/>
</div>
<div>
form proxy ->
<label value="@init(fx)"/>
</div>
<label sclass="label">Country</label>
<span sclass="input">
<combobox id="cb" model="@load(vm.children)"
selectedItem="@bind(fx.child)" autocomplete="true" constraint="no empty"
>
<template name="model">
<comboitem label="@load(each.name)" description="@load(each.age)"/>
</template>
</combobox>
</span>
<button sclass="button" label="save" onClick="@command('save', test='testStr')"/>
<button sclass="button" label="cancel" onClick="@command('cancel', test='testStr')"/>
</div>
Result
<label value="@load(vm.myPojo.child)"/>
</div>
</zk>B102_ZK_5889ViewModel.javajavaimport org.zkoss.bind.annotation.*;
import org.zkoss.zk.ui.util.Clients;
import java.util.*;
public class B102_ZK_5889ViewModel {
private B102_ZK_5889Pojo myPojo;
public List<B102_ZK_5889ChildPojo> getChildren() {
return children;
}
public void setChildren(List<B102_ZK_5889ChildPojo> children) {
this.children = children;
}
private List<B102_ZK_5889ChildPojo> children = new ArrayList<>();
@Init
public void init() {
myPojo = new B102_ZK_5889Pojo();
myPojo.setChild(new B102_ZK_5889ChildPojo());
children.add(new B102_ZK_5889ChildPojo("child1", 1));
children.add(new B102_ZK_5889ChildPojo("child2", 2));
children.add(new B102_ZK_5889ChildPojo("child3", 3));
children.add(new B102_ZK_5889ChildPojo("child4", 4));
children.add(new B102_ZK_5889ChildPojo("child5", 5));
}
@Command
public void cancel() {
Clients.log("cancelled: " + myPojo.getDebugString());
}
@Command
public void save() {
Clients.log("saved: " + myPojo.getDebugString());
}
public B102_ZK_5889Pojo getMyPojo() {
return myPojo;
}
}
B102_ZK_5889Pojo.javajavapublic class B102_ZK_5889Pojo {
private String name = "";
private int age;
private B102_ZK_5889ChildPojo child;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
// @Immutable
public B102_ZK_5889ChildPojo getChild() {
return child;
}
public void setChild(B102_ZK_5889ChildPojo child) {
this.child = child;
}
public String getDebugString() {
return "MyPojo{" + "name='" + name + '\'' + ", age=" + age + '}' + " Child=" + child;
}
}
B102_ZK_5889ChildPojo.javajavapublic class B102_ZK_5889ChildPojo {
private String name = "";
private int age;
public B102_ZK_5889ChildPojo() {
}
public B102_ZK_5889ChildPojo(String name, int age) {
this.name = name;
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getDebugString() {
return "ChildPojo{" + "name='" + name + '\'' + ", age=" + age + '}';
}
}