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 AMlinkStackup Problem
2guest109.218.248.222rddvqsApr 29, 2015 8:51:24 PMlinkresources
index.zulzul<?page automaticTimeout="false"?>
<?script content="zk.useStackup = 'auto/gecko';"?>
<zk xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="client">
<style src="assets/css/Custom.css" />
<window apply="org.zkoss.bind.BindComposer"
viewModel="@id('vm') @init('pkg$.MainViewModel')" height="100%" width="100%" >
<borderlayout id="main" height="100%" width="100%" visible="true" style="border: 0px; padding: 0px">
<north title="Payment Approval">
<caption>
<hbox>
<toolbar id="tb" sclass="default">
<toolbarbutton label="download all" tooltiptext="download all invoice pages" />
<space />
<toolbarbutton label="show check" dir="reverse" />
<space />
<toolbarbutton label="approve batch" dir="reverse" />
</toolbar>
<space width="20px" />
<vbox align="center" width="200px">
<label value="Login" onClick='loginPop.open(self.getParent().getParent(), "after_end")' sclass="pseudoLink" visible="@bind(not vm.isAuthenticated)" />
<label value="@bind(vm.userName)" sclass="pseudoLink" visible="@bind(vm.isAuthenticated)" />
</vbox>
</hbox>
</caption>
</north>
<west size="100%" width="330px" splittable="true" style="border: none" title="">
<vlayout height="100%" style="border: none; padding: 0px">
<hbox width="100%">
<label value="Batch" width="130px"/>
<combobox id="batchCombobox" width="200px" />
</hbox>
<grid id="checks" style="overflow: hidden; overflow-v: auto" >
<columns>
<column width="15%" />
<column label="Check and Vendor" sort="auto" width="60%" />
<column label="Amount" align="right" sort="auto" width="20%" />
</columns>
<rows>
<row>
<detail open="false">
<hlayout width="100%">
<image src="assets/images/doc.png" />
<label value="06515407" width="150px" />
<label value="100.00" style="text-align: right" width="200px" />
</hlayout>
</detail>
<label value="10012237 John Doe" />
<label value="100.00" />
</row>
<row>
<detail open="false">
<hlayout width="100%">
<image src="assets/images/doc.png" />
<label value="06515405" />
<label value="100.00" style="text-align: right" width="200px" />
</hlayout>
</detail>
<label value="10012238 Jane Doe" />
<label value="100.00" />
</row>
</rows>
</grid>
<vlayout height="400px" style="border: none; padding: 0px">
</vlayout>
</vlayout>
</west>
<center autoscroll="true" sclass="z-valign-top" style="overflow:hidden">
<borderlayout id="inner" height="100%" width="100%" visible="true">
<north height="200px">
<label value="place holder" />
</north>
<center>
<iframe autohide="true" src="http://www.sinclairoil.com/pdfs/msds/502-000.pdf" height="100%" width="100%" style="background-color: transparent; overflow:auto"/>
</center>
</borderlayout>
</center>
</borderlayout>
<popup id="loginPop" draggable="true" style="background-color: transparent" width="300px">
<window mode="overlapped" title="Login">
<vlayout id="loginLayout">
<textbox id="userName" maxlength="10" onOK="@command('loginUser')" style="font-style: italic" value="@save(vm.userName, before='loginUser')" width="150px"/>
<textbox id="userPassword" maxlength="10" c:onFocus="this.setType('password');" onOK="@command('loginUser')" style="font-style: italic" value="@save(vm.userPassword, before='loginUser')" width="150px" />
<combobox id="domainCombo" mold="rounded" onCreate="self.setSelectedIndex(0);" value="@save(vm.domain, before='loginUser')" >
<comboitem label="DOMAIN1" />
<comboitem label="DOMAIN2" />
<comboitem label="DOMAIN3" />
</combobox>
<button id="submitLogin" label="submit" onClick="@command('loginUser')" width="100px" />
</vlayout>
</window>
</popup>
</window>
</zk>MainViewModel.javajava
import java.util.List;
import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.NotifyChange;
import org.zkoss.zul.Messagebox;
public class MainViewModel
{
private Boolean isAuthenticated;
private String domain;
private String userName;
private String userPassword;
public MainViewModel()
{
super();
isAuthenticated = new Boolean(false);
}
/**
* Command methods
*/
@Command @NotifyChange("isAuthenticated")
public void loginUser()
{
Messagebox.show("Logging in...");
isAuthenticated = true;
}
/**
* Getters and Setters
*/
public Boolean getIsAuthenticated()
{
return isAuthenticated;
}
public void setDomain(String domain)
{
this.domain = domain;
}
public String getUserName()
{
return userName;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public void setUserPassword(String userPassword)
{
this.userPassword = userPassword;
}
}
Custom.csscss* {
color: #191919;
}
/*** box ***/
.z-box.noborder {
border: none;
}
/*** button ****/
.genPassword {
background: url("../images/refresh.png") no-repeat 0 0px;
cursor: pointer;
}
.genPassword:HOVER {
background: url("../images/refresh-over.png") no-repeat 0 0px;
}
}
.z-button-cm {
text-align: right;
}
/*** cell ***/
.z-cell {
overflow: hidden;
}
/*** center ***/
.z-center {
text-align: left;
}
/*** checkbox ***/
.z-checkbox .z-checkbox-cnt {
padding-right: 5px;
}
/*** combobox ***/
.z-combobox-inp {
overflow: hidden;
}
.z-combobox-rounded-inp {
overflow: hidden;
}
.z-combobox-rounded-pp .z-comboitem, .z-combobox-pp .z-comboitem
{
padding-bottom: 2px;
padding-top: 2px;
}
.z-combobox-rounded-pp .z-comboitem-over,.z-combobox-pp .z-comboitem-over
{
background: #FDFDCD;
}
.z-combobox-rounded-pp .z-comboitem-seld, .z-combobox-pp .z-comboitem-seld
{
background: #FDFDCD;
border-top: 1px solid;
border-bottom: 1px solid;
}
/*** datebox ***/
.z-datebox-rounded .z-datebox-inp {
width: 75px;
}
.z-calendar-caldow .z-calendar-wkend {
color: #cb0017;
}
td.z-calendar-wkend {
color: #cb0017;
background-color: #FFFFFF;
}
.z-calendar-calmon td.z-calendar-disd,
.z-calendar-calday td.z-calendar-disd,
.z-datebox-calmon td.z-datebox-disd,
.z-datebox-calday td.z-datebox-disd {
background: #E9E9E9;
}
.z-calendar-calmon td.z-calendar-over,
.z-calendar-calday td.z-calendar-over,
.z-datebox-calmon td.z-datebox-over,
.z-datebox-calday td.z-datebox-over {
background: #D4EEDD;
}
.z-calendar-calmon td.z-calendar-seld,
.z-calendar-calday td.z-calendar-seld,
.z-datebox-calmon td.z-datebox-seld,
.z-datebox-calday td.z-datebox-seld {
color: #FFFFFF;
background: #C0E6CD;
}
/*** Grid ***/
.z-grid {
overflow: hidden;
}
.z-grid-autopaging .z-row-cnt {
height: 20px;
overflow: hidden;
}
.gridLayoutNoBorder tr.z-row td.z-row-inner,
tr.z-row td.z-cell,
tr.z-row,
div.z-grid-body div.z-cell,
div.z-grid {
border: none;
zoom: 1;
background: white;
border-bottom: none;
border-left: none;
border-right: none;
border-top: none;
overflow: hidden;
text-align: left;
}
tr.z-row td.z-row-inner {
border: none;
height: 20px;
line-height: 20px;
min-height: 20px;
}
.scrollableGridLayoutNoBorder tr.z-row td.z-row-inner,
tr.z-row td.z-cell,
tr.z-row,
div.z-grid-body div.z-cell,
div.z-grid {
border: 1px solid black;
zoom: 1;
background: white;
border-bottom: none;
border-left: none;
border-right: none;
border-top: none;
text-align: left;
overflow: auto;
}
/*** Groupbox ***/
.selectionGroupBox * .z-groupbox-cnt {
border: none;
border-bottom: none;
border-left: none;
border-right: none;
border-top: none;
overflow: hidden;
padding: 0px;
text-align: left;
}
.z-groupbox .groupBoxCaption .folder {
background: url("../images/folder.png") no-repeat 0 -16px;
height: 16px;
padding-left: 18px;
_display: inline;
opacity: .0;
-moz-opacity: .0;
filter: alpha(opacity=0);
text-align: left;
}
.z-groupbox-colpsd .groupBoxCaption {
display: groupBoxCaption;
}
.z-groupbox-colpsd .groupBoxCaption .folder {
background-position: 0 0;
}
.z-groupbox.noborder {
border: none;
display: inline-groupBoxCaption;
}
/*** label ***/
.instructions {
font-style: italic;
}
.numericText {
padding-right: 13px;
text-align: right;
}
.redLabel {
color: #CB0017;
}
.right {
text-align: right;
}
.strongLabel {
color: #636363;
font-weight: bold;
}
.sectionHeader {
font-size: 14px;
font-weight: bold;
line-height: 30px;
}
.z-panel:HOVER * .pseudoLink,
.z-groupbox.noborder:HOVER * .pseudoLink {
text-decoration: underline;
}
.pseudoLink:HOVER {
color: #CB0017;
font-weight: bold;
}
/*** layout ***/
.z-hlayout {
border: none;
overflow: hidden;
padding-left: 3px;
padding-right: 3px;
text-align: left;
}
.z-hlayout.center
{
text-align: center;
vertical-align: bottom;
}
.z-hlayout.numericText
{
padding-right: 10px;
text-align: right;
vertical-align: bottom;
}
.z-hlayout.right
{
overflow: hidden;
text-align: right;
vertical-align: bottom;
}
.z-vlayout {
overflow: hidden;
text-align: center;
}
.z-borderlayout {
background: transparent;
text-align: center;
}
.z-west {
margin-top: 11px;
}
/*** listbox ***/
.ListLayoutNoBorder tr.z-listitem,
tr.z-listitem a,
tr.z-listitem a:visited,
tr.z-listitem td.z-listitem-focus,
tr.z-listitem-seld,
tr.z-listitem-over,
tr.z-listitem-over-seld,
div.z-listcell-cnt
{
border: none;
zoom: 1;
border-bottom: none;
border-left: none;
border-right: none;
border-top: none;
height: 100%;
overflow: hidden;
text-align: left;
}
.z-listbox-pgi-b {
vertical-align: middle;
}
.z-listbox-autopaging .z-listcell-cnt {
height: 100%;
overflow: hidden;
vertical-align: middle;
}
.z-listcell * .z-label {
padding-right: 3px;
}
.z-panel:HOVER * tr.z-listitem-over td.z-listcell {
background: #FDFDCD;
}
.z-panel:HOVER * tr.z-listitem-seld td.z-listcell {
background: #FDFDCD;
border-top: 1px solid;
border-bottom: 1px solid;
}
.z-panel:HOVER * tr.z-listbox-odd
{
background: #D4EEDD;
}
/*** selection groupbox and folder ***/
.groupBoxCaption {
display: groupBoxCaption;
text-align: left;
opacity: .0;
-moz-opacity: .0;
filter: alpha(opacity=0);
}
.folder {
background: url("../images/folder.png") no-repeat 0 -16px;
height: 16px;
padding-left: 18px;
opacity: .0;
-moz-opacity: .0;
filter: alpha(opacity=0);
}
.visibleFolder {
background: url("../images/folder.png") no-repeat 0 -16px;
height: 16px;
padding-left: 18px;
opacity: 1.0;
-moz-opacity: 1.0;
filter: alpha(opacity=100);
}
.z-groupbox {
border: 0px;
padding: 0px;
padding-top: 3px;
}
.z-groupbox-body,
.z-groupbox-cnt,
.z-groupbox-hl,
.z-groupbox-hm,
.z-groupbox-hr {
border: 0px;
}
.z-groupbox-cnt {
padding-bottom: 0px;
}
.z-panel:HOVER * .z-groupbox,
.z-panel:HOVER * .z-groupbox .groupBoxCaption,
.z-panel:HOVER * .z-groupbox .groupBoxCaption .folder {
opacity: .60;
-moz-opacity: .60;
filter: alpha(opacity=60);
}
.z-panel:HOVER * .z-groupbox:HOVER,
.z-panel:HOVER * .z-groupbox:HOVER .groupBoxCaption,
.z-panel:HOVER * .z-groupbox:HOVER .groupBoxCaption .folder {
opacity: 1.0;
-moz-opacity: 1.0;
filter: alpha(opacity=100);
}
/*** menubar ***/
.z-hlayout.right {
background: transparent no-repeat;
border: 0px;
}
.z-menubar-hor {
background: transparent no-repeat;
border: 0px;
height: 22px;
opacity: .0;
-moz-opacity: .0;
filter: alpha(opacity=0);
vertical-align: middle;
}
.z-menu-btn {
height: 20px;
}
.z-panel:HOVER * .z-menubar-hor,
.z-window-embedded:HOVER * .z-menubar-hor,
.z-window-modal:HOVER * .z-menubar-hor,
.z-window-overlapped:HOVER * .z-menubar-hor,
.z-window-popup:HOVER * .z-menubar-hor,
.z-window-highlighted:HOVER * .z-menubar-hor {
opacity: 0.6;
-moz-opacity: 0.6;
filter: alpha(opacity=60);
}
.z-hlayout.right:HOVER .z-menubar-hor {
opacity: 1.0;
-moz-opacity: 1.0;
filter: alpha(opacity=100);
}
{
background: transparent no-repeat;
border: 0px;
height: 22px;
opacity: .0;
-moz-opacity: .0;
filter: alpha(opacity=0);
vertical-align: middle;
}
/*** panel ***/
.z-panel {
z-index: 100;
padding-top: 5px;
}
.z-panel:HOVER .z-panel-hm .z-panel-header,
.z-panel:HOVER .z-panel-header {
font-size: 12x;
font-weight: bold;
}
.z-panel.bottomborder
{
border-bottom: 1px solid #959595;
}
.z-panel-icon {
background-image: url('../images/blank-icons.png');
background-repeat: no-repeat;
margin-top: -5px;
}
.z-panel:HOVER * .z-panel-icon {
background-image: url('../images/win-icons.png');
background-repeat: no-repeat;
margin-top: -5px;
}
.z-panel:HOVER * .z-panel-close {
background-position: 0px -34px;
}
.z-panel:HOVER * .z-panel-close-over {
background-position: -19px -34px;
}
.z-panel:HOVER * .z-panel-max {
background-position: 0px 0px;
}
.z-panel:HOVER * .z-panel-max-over {
background-position: -19px 0px;
}
.z-panel:HOVER * .z-panel-maxd {
background-position: 0px -16px;
}
.z-panel:HOVER * .z-panel-maxd-over {
background-position: -19px -16px;
}
.z-panel-tl {
z-index: 101;
}
.z-today div {
color: red;
font-weight: bold;
}
.z-flow-r {
float: right;
}
.z-pretty {
padding: 5px;
}
.zk-v {
padding: 5px;
text-align: right;
color: #939393;
font-style: italic;
}
.zk-v span {
font-size: 10px;
}
.z-west-colpsd {
background-color: #00703A;
}
/*** pivot table ***/
.pivotImage {
background: url("../images/xls.png") no-repeat;
cursor: pointer;
}
.pivotImage:HOVER {
background: url("../images/xls-over.png") no-repeat;
}
/*** portalchildren ***/
.z-portalchildren {
min-width: 460px;
padding: 5px
}
/*** space ***/
.z-space {
padding: 0px;
}
/*** toolbar ***/
.z-toolbar a,
.z-toolbar a:visited,
.z-toolbar a:hover {
background-color:transparent;
border:0 none;
}
/*** window ***/
.z-window-overlapped-header {
font-size: 12px;
font-weight: bold;
}
.z-window-overlapped-icon {
background-image: url('../images/win-icons.png');
background-repeat: no-repeat;
margin-top: -5px;
}
.z-window-overlapped * .z-window-overlapped-close {
background-position: -0px -34px;
}
.z-window-overlapped * .z-window-overlapped-close-over {
background-position: -19px -34px;
}
.water-mark {
color: gray; font-style: italic;
}
.form {
border: 1px solid #E1E1E1;
background: url('../images/bg.png');
padding: 20px 20px;
-webkit-border-radius:4px;
-moz-border-radius:4px;
border-radius:4px;
}
.form .name {
display: block;
width: 100px;
text-align: center;
}