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 :
constraint binding textbox
3guest172.68.151.16220peldaDec 5, 2025 5:08:19 PMlinkAnother new ZK fiddle
2guest172.68.151.16320peldaDec 5, 2025 5:07:51 PMlinkAnother new ZK fiddle
1guest172.68.151.16220peldaDec 5, 2025 5:07:32 PMlinkAnother new ZK fiddle
1peggypeng172.71.154.99364f4neDec 5, 2025 9:24:31 AMlinktooltip example
2guest104.22.23.13rc1ntoDec 4, 2025 2:23:45 PMlinkAnother new ZK fiddle
1guest172.69.134.2277t7602Dec 4, 2025 1:40:46 PMlinkAnother new ZK fiddle
1peggypeng104.22.17.1802df6e3oDec 4, 2025 8:41:29 AMlinkonClose
1peggypeng172.68.87.248j8kd8aDec 3, 2025 4:10:26 AMlinkAnother new ZK fiddle
1peggypeng172.69.134.2271rm7f4eNov 26, 2025 3:31:24 AMlinkZK-5912-Suggestion
2rebeccalai104.22.20.1442qrmiiuNov 26, 2025 2:07:15 AMlinkpanel not scrolling 2 template
4elopez190.181.30.1151mrr2nmApr 18, 2013 10:16:58 PMlinkresources
index.zulzul<zk>
<?link rel="stylesheet" type="text/css" href="base.css"?>
<script type="text/javascript">
function setVisible(panelName){
var detailPanels=["detailsPanel1","detailsPanel2","detailsPanel3","detailsPanel4"];
for (i=0;i < detailPanels.length;i++){
detailPanels[i];
var tb = zk.Widget.$(jq("$"+detailPanels[i]));
tb.setVisible(false);
}
var tb = zk.Widget.$(jq(panelName));
tb.setVisible(true);
}
</script>
<borderlayout vflex="1" hflex="1" animationDisabled="true" xmlns:w="client">
<north border="0" vflex="min">
<attribute name="onSwipe"><![CDATA[
SwipeEvent se = (SwipeEvent) event;
String direction = se.getSwipeDirection();
if ("up".equals(direction) ){
navigationBar.setOpen(false);
}
else if ("down".equals(direction) ){
navigationBar.setOpen(true);
}
]]></attribute>
<div>
<menupopup id="settingMenu">
<menuitem label="Log out" />
</menupopup>
<hbox hflex="1" vflex="1" sclass="utilitybar">
<cell align="left" hflex="6">
</cell>
<cell align="center" hflex="4" style="vertical-align:middle;" >
<label sclass="utilitybar-tittle" value="My APP" />
</cell>
<cell align="right" hflex="6">
<image sclass="settings-image" popup="settingMenu" />
</cell>
</hbox>
</div>
</north>
<center border="0" >
<borderlayout vflex="1" hflex="1" animationDisabled="true">
<north border="0" id="navigationBar" splittable="true" collapsible="true">
<attribute name="onSwipe"><![CDATA[
SwipeEvent se = (SwipeEvent) event;
String direction = se.getSwipeDirection();
if ("up".equals(direction) ){
navigationBar.setOpen(false);
}
else if ("down".equals(direction) ){
navigationBar.setOpen(true);
}
]]></attribute>
<vlayout id="navigationLayout" spacing="0" hflex="1" vflex="1" >
<a id="navApps" href="#"
onClick="detailsPanel1.setVisible(true)"
vflex="1" hflex="1">
<label sclass="navigationbar-left" value="Menu 1" />
</a>
<a id="navServices" href="#" class="button margin-less-btn navigationbar-tittle "
onClick="detailsPanel2.setVisible(true)"
vflex="1" hflex="1">
<label sclass="navigationbar-left" value="Menu 2" />
</a>
<a id="navCloud" href="#" class="button margin-less-btn navigationbar-tittle "
w:onClick="setVisible('$detailsPanel3'); "
vflex="1" hflex="1">
<label sclass="navigationbar-left" value="Menu 3" />
</a>
<a id="navRuntime" href="#" class="button margin-less-btn navigationbar-tittle"
w:onClick="setVisible('$detailsPanel14');" vflex="1" hflex="1" >
<label sclass="navigationbar-left" value="Menu 4" />
</a>
</vlayout>
</north>
<center id="detailsSection" >
<div hflex="1" vflex="1" >
<panel id="detailsPanel1" hflex="1" vflex="1" visible="false" >
<custom-attributes org.zkoss.zk.ui.updateByClient="true"/>
<caption style="background: darkgray;color: white; vertical-align:middle;" >
<label style="float:left; font-size:18px;" value="Details 1" />
</caption>
<panelchildren style="overflow:auto">
<include src="details1.zul" />
</panelchildren>
</panel>
<panel id="detailsPanel2" hflex="1" vflex="1" visible="true" >
<custom-attributes org.zkoss.zk.ui.updateByClient="true"/>
<caption style="background: darkgray;color: white; " >
<label style="float:left; font-size:18px;" value="Details 2" />
</caption>
<panelchildren style="overflow:auto" >
<include src="details2.zul" />
</panelchildren>
</panel>
<panel id="detailsPanel3" hflex="1" vflex="1" visible="false" >
<custom-attributes org.zkoss.zk.ui.updateByClient="true"/>
<caption style="background: darkgray;color: white; " >
<label style="float:left; font-size:18px;" value="Details 3" />
</caption>
<panelchildren style="overflow:auto" >
Menu 3
</panelchildren>
</panel>
<panel id="detailsPanel4" hflex="1" vflex="1" visible="false" >
<custom-attributes org.zkoss.zk.ui.updateByClient="true"/>
<caption style="background: darkgray;color: white; " >
<label style="float:left; font-size:18px;" value="Details 4" />
</caption>
<panelchildren style="overflow:auto" >
Menu 4
</panelchildren>
</panel>
</div>
</center>
</borderlayout>
</center>
</borderlayout>
</zk>
TestVM.javajavaimport org.zkoss.zk.ui.*;
import org.zkoss.zk.ui.event.*;
import org.zkoss.zk.ui.util.*;
import org.zkoss.zk.ui.ext.*;
import org.zkoss.zk.au.*;
import org.zkoss.zk.au.out.*;
import org.zkoss.zul.*;
public class TestVM {
public String[] getItemsList() {
String[] data = new String[50];
for (int i = 0; i < data.length; i++) {
data[i] = "item " + i;
}
return data;
}
}
details1.zulzul<zk>
<div hflex="1" >
<listbox id="lbx" xmlns:ca="client/attribute" ca:data-scrollable="false" />
<zscript><![CDATA[
String[] data = new String[50];
for (int i = 0; i < data.length; i++) {
data[i] = "item " + i;
}
org.zkoss.zul.ListModel strset = new org.zkoss.zul.SimpleListModel(data);
lbx.setModel(strset);
]]></zscript>
</div>
</zk>
details2.zulzul<zk>
<div hflex="1" >
<listbox id="lbx" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('pkg$.TestVM')"
xmlns:ca="client/attribute" ca:data-scrollable="false" model="@load(vm.itemsList)" >
<listhead />
<template name="model" var="applicationItem">
<listitem>
<listcell>
<panel collapsible="true" open="false">
<caption style="vertical-align:baseline;">
<label style="float:left"
sclass="details-subtitle" value="Item 1" />
</caption>
<panelchildren>
<panel collapsible="true" open="false">
<caption>
<label
style="float:left; margin-right:20px;" value="label 1:" />
<label
style="float:left; margin-right:20px;"
value="2" />
</caption>
<panelchildren>
<zk choose="">
<zk when="false">
<vlayout style="margin-bottom:20px;">
<hbox
style="margin-top:20px;">
<button
style="margin-left:20px;">
Update version TBD
</button>
<a
style="margin-left:20px;">
What's new?
</a>
</hbox>
<a style="margin-left:20px;">
Revert to version TBD
</a>
</vlayout>
</zk>
<zk><!-- default -->
<vlayout style="margin-top:20px;margin-bottom:20px;">
<label
style="margin-left:20px; color:dimgray;"
sclass="details-subtitle">
No Updates Available.
</label>
<a style="margin-left:20px;">
Revert to version TBD
</a>
</vlayout>
</zk>
</zk>
</panelchildren>
</panel>
<panel collapsible="true" open="false">
<caption>
<label
style="float:left; margin-right:20px;" value="Users:" />
<label style="float:left; margin-right:20px;" value="4" />
</caption>
<panelchildren>
<vlayout>
<image style="float:left"
class="search-image" />
<button style="float:right"
label="Logoff User" />
</vlayout>
<listbox multiple="true"
checkmark="true" emptyMessage="No users match your search">
<listitem>
<listcell label="User 0" />
</listitem>
<listitem>
<listcell label="User 1" />
</listitem>
<listitem>
<listcell label="User 2" />
</listitem>
<listitem>
<listcell label="User 3" />
</listitem>
<listitem>
<listcell label="User 4" />
</listitem>
</listbox>
</panelchildren>
</panel>
<panel collapsible="true" open="false">
<caption>
<label
style="float:left; margin-right:20px; " value="Status:" />
<label
style="float:left; margin-right:20px;"
value="running" />
</caption>
<panelchildren>
<hbox hflex="1"
style="margin-top:20px">
<cell hflex="1"
align="center">
<button label="Stop" />
<button label="Uninstall" />
</cell>
</hbox>
</panelchildren>
</panel>
</panelchildren>
</panel>
</listcell>
</listitem>
</template >
</listbox>
</div>
</zk>
base.csscss/*
* Skeleton V1.2
* Copyright 2011, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 6/20/2012
*/
/* Table of Content
==================================================
#Reset & Basics
#Basic Styles
#Site Styles
#Typography
#Links
#Lists
#Images
#Buttons
#Forms
#Misc */
/* #Reset & Basics (Inspired by E. Meyers)
================================================== */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block; }
body {
line-height: 1; }
ol, ul {
list-style: none; }
blockquote, q {
quotes: none; }
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none; }
table {
border-collapse: collapse;
border-spacing: 0; }
/* #Basic Styles
================================================== */
body {
background: #fff;
font: 14px/21px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #444;
-webkit-font-smoothing: antialiased; /* Fix for webkit rendering */
-webkit-text-size-adjust: 100%;
}
/* #Typography
================================================== */
h1, h2, h3, h4, h5, h6 {
color: #181818;
font-family: "Georgia", "Times New Roman", serif;
font-weight: normal; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; }
h1 { font-size: 46px; line-height: 50px; margin-bottom: 14px;}
h2 { font-size: 35px; line-height: 40px; margin-bottom: 10px; }
h3 { font-size: 28px; line-height: 34px; margin-bottom: 8px; }
h4 { font-size: 21px; line-height: 30px; margin-bottom: 4px; }
h5 { font-size: 17px; line-height: 24px; }
h6 { font-size: 14px; line-height: 21px; }
.subheader { color: #777; }
p { margin: 0 0 20px 0; }
p img { margin: 0; }
p.lead { font-size: 21px; line-height: 27px; color: #777; }
em { font-style: italic; }
strong { font-weight: bold; color: #333; }
small { font-size: 80%; }
/* Blockquotes */
blockquote, blockquote p { font-size: 17px; line-height: 24px; color: #777; font-style: italic; }
blockquote { margin: 0 0 20px; padding: 9px 20px 0 19px; border-left: 1px solid #ddd; }
blockquote cite { display: block; font-size: 12px; color: #555; }
blockquote cite:before { content: "\2014 \0020"; }
blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color: #555; }
hr { border: solid #ddd; border-width: 1px 0 0; clear: both; margin: 10px 0 30px; height: 0; }
/* #Links
================================================== */
a, a:visited { color: #333; text-decoration: underline; outline: 0; }
a:hover, a:focus { color: #000; }
p a, p a:visited { line-height: inherit; }
/* #Lists
================================================== */
ul, ol { margin-bottom: 20px; }
ul { list-style: none outside; }
ol { list-style: decimal; }
ol, ul.square, ul.circle, ul.disc { margin-left: 30px; }
ul.square { list-style: square outside; }
ul.circle { list-style: circle outside; }
ul.disc { list-style: disc outside; }
ul ul, ul ol,
ol ol, ol ul { margin: 4px 0 5px 30px; font-size: 90%; }
ul ul li, ul ol li,
ol ol li, ol ul li { margin-bottom: 6px; }
li { line-height: 18px; margin-bottom: 12px; }
ul.large li { line-height: 21px; }
li p { line-height: 21px; }
/* #Images
================================================== */
img.scale-with-grid {
max-width: 100%;
height: auto; }
/* #Buttons
================================================== */
.button,
button,
input[type="submit"],
input[type="reset"],
input[type="button"] {
background: #eee; /* Old browsers */
background: #eee -moz-linear-gradient(top, rgba(255,255,255,.2) 0%, rgba(0,0,0,.2) 100%); /* FF3.6+ */
background: #eee -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.2)), color-stop(100%,rgba(0,0,0,.2))); /* Chrome,Safari4+ */
background: #eee -webkit-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* Chrome10+,Safari5.1+ */
background: #eee -o-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* Opera11.10+ */
background: #eee -ms-linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* IE10+ */
background: #eee linear-gradient(top, rgba(255,255,255,.2) 0%,rgba(0,0,0,.2) 100%); /* W3C */
border: 1px solid #aaa;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
color: #444;
display: inline-block;
font-size: 11px;
font-weight: bold;
text-decoration: none;
text-shadow: 0 1px rgba(255, 255, 255, .75);
cursor: pointer;
margin-bottom: 20px;
line-height: normal;
padding: 8px 10px;
font-family: "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover {
color: #222;
background: #ddd; /* Old browsers */
background: #ddd -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%); /* FF3.6+ */
background: #ddd -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.3)), color-stop(100%,rgba(0,0,0,.3))); /* Chrome,Safari4+ */
background: #ddd -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Chrome10+,Safari5.1+ */
background: #ddd -o-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* Opera11.10+ */
background: #ddd -ms-linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* IE10+ */
background: #ddd linear-gradient(top, rgba(255,255,255,.3) 0%,rgba(0,0,0,.3) 100%); /* W3C */
border: 1px solid #888;
border-top: 1px solid #aaa;
border-left: 1px solid #aaa; }
.button:active,
button:active,
input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active {
border: 1px solid #666;
background: #ccc; /* Old browsers */
background: #ccc -moz-linear-gradient(top, rgba(255,255,255,.35) 0%, rgba(10,10,10,.4) 100%); /* FF3.6+ */
background: #ccc -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,.35)), color-stop(100%,rgba(10,10,10,.4))); /* Chrome,Safari4+ */
background: #ccc -webkit-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* Chrome10+,Safari5.1+ */
background: #ccc -o-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* Opera11.10+ */
background: #ccc -ms-linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* IE10+ */
background: #ccc linear-gradient(top, rgba(255,255,255,.35) 0%,rgba(10,10,10,.4) 100%); /* W3C */ }
.button.full-width,
button.full-width,
input[type="submit"].full-width,
input[type="reset"].full-width,
input[type="button"].full-width {
width: 100%;
padding-left: 0 !important;
padding-right: 0 !important;
text-align: center; }
/* Fix for odd Mozilla border & padding issues */
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/* #Forms
================================================== */
form {
margin-bottom: 20px; }
fieldset {
margin-bottom: 20px; }
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
border: 1px solid #ccc;
padding: 6px 4px;
outline: none;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #777;
margin: 0;
width: 210px;
max-width: 100%;
display: block;
margin-bottom: 20px;
background: #fff; }
select {
padding: 0; }
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
textarea:focus {
border: 1px solid #aaa;
color: #444;
-moz-box-shadow: 0 0 3px rgba(0,0,0,.2);
-webkit-box-shadow: 0 0 3px rgba(0,0,0,.2);
box-shadow: 0 0 3px rgba(0,0,0,.2); }
textarea {
min-height: 60px; }
label,
legend {
display: block;
font-weight: bold;
font-size: 13px; }
select {
width: 220px; }
input[type="checkbox"] {
display: inline; }
label span,
legend span {
font-weight: normal;
font-size: 13px;
color: #444; }
/* #Misc
================================================== */
.remove-bottom { margin-bottom: 0 !important; }
.half-bottom { margin-bottom: 10px !important; }
.add-bottom { margin-bottom: 20px !important; }