Processing...

Suggested case list:

Using timer to refresh a grid

383guest172.69.33.12125nk0uiMay 7, 2020 7:23:47 AMlink

user model to move item to another listbox

120guest162.158.193.148d0n3krApr 2, 2020 5:28:28 AMlink

Disabled list item row passed to VM-1981

296fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:44 PMlink

Disabled list item row passed to VM-1981

295fatih123160.83.36.13025nk0uiFeb 13, 2018 4:25:16 PMlink

Disabled list item row passed to VM-1981

294fatih123160.83.36.13225nk0uiFeb 13, 2018 3:30:44 PMlink

grid sample with ListModel/RowRenderer

816guest80.82.2.1312vah9ajFeb 21, 2017 11:42:21 AMlink

grid sample with ListModel/RowRenderer

809guest175.98.113.1622vah9ajJan 26, 2017 9:19:33 AMlink

grid sample with ListModel/RowRenderer

196guest79.185.142.402vah9ajApr 26, 2014 10:53:57 PMlink

grid sample with ListModel/RowRenderer

195guest79.185.142.402vah9ajApr 26, 2014 10:53:54 PMlink

grid sample with ListModel/RowRenderer

194guest79.185.142.402vah9ajApr 26, 2014 10:53:51 PMlink

grid sample with ListModel/RowRenderer

193guest79.185.142.402vah9ajApr 26, 2014 10:53:48 PMlink

grid sample with ListModel/RowRenderer

192guest79.185.142.402vah9ajApr 26, 2014 10:53:44 PMlink

grid sample with ListModel/RowRenderer

191guest79.185.142.402vah9ajApr 26, 2014 10:53:40 PMlink

Hierarchy table without using ZK PE/EE

1aaknai151.28.135.2131s871daJul 29, 2013 11:02:46 PMlink

grid sample with ListModel/RowRenderer

128aaknai151.28.135.2132vah9ajJul 29, 2013 7:20:00 PMlink

user model to move item to another listbox

1TonyQ114.25.109.94d0n3krApr 21, 2012 10:43:27 AMlink

Using timer to refresh a grid

1TonyQ220.133.44.3725nk0uiFeb 17, 2012 3:17:34 AMlink

Fire a event from child iframe

1TonyQ220.133.44.372eupjotFeb 3, 2012 5:04:52 AMlink

Textbox input restriction sample

1TonyQ72.21.245.2431b3nlr0Dec 20, 2011 10:09:10 AMlink

Test web core taglib in ZUL

1TonyQ198.203.175.175ofqkemDec 17, 2011 3:36:08 AMlink

Latest 10 Fiddles :

constraint binding textbox

3guest172.68.151.16220peldaDec 5, 2025 5:08:19 PMlink

Another new ZK fiddle

2guest172.68.151.16320peldaDec 5, 2025 5:07:51 PMlink

Another new ZK fiddle

1guest172.68.151.16220peldaDec 5, 2025 5:07:32 PMlink

Another new ZK fiddle

1peggypeng172.71.154.99364f4neDec 5, 2025 9:24:31 AMlink

tooltip example

2guest104.22.23.13rc1ntoDec 4, 2025 2:23:45 PMlink

Another new ZK fiddle

1guest172.69.134.2277t7602Dec 4, 2025 1:40:46 PMlink

Another new ZK fiddle

1peggypeng104.22.17.1802df6e3oDec 4, 2025 8:41:29 AMlink

onClose

1peggypeng172.68.87.248j8kd8aDec 3, 2025 4:10:26 AMlink

Another new ZK fiddle

1peggypeng172.69.134.2271rm7f4eNov 26, 2025 3:31:24 AMlink

ZK-5912-Suggestion

2rebeccalai104.22.20.1442qrmiiuNov 26, 2025 2:07:15 AMlink

Grid

1guest172.70.143.12418tjbo4Oct 4, 2022 11:01:25 AMlink

resources

index.zulzul<zk> <window id="myWindow" border="normal" title="Grid Showcase" viewModel="@id('vm') @init('pkg$.MyComposer')" apply="org.zkoss.bind.BindComposer"> <hlayout> <div style="margin: 10px"> <button id="btnQ1" label="Q1" autodisable="self" onClick="@command('onClickQ1')" visible="true" style="@load(vm.styleQ1)" /> <button id="btnQ2" label="Q2" autodisable="self" onClick="@command('onClickQ2')" visible="true" style="@load(vm.styleQ2)" /> <button id="btnQ3" label="Q3" autodisable="self" onClick="@command('onClickQ3')" visible="true" style="@load(vm.styleQ3)" /> <button id="btnQ4" label="Q4" autodisable="self" onClick="@command('onClickQ4')" visible="true" style="@load(vm.styleQ4)" /> </div> </hlayout> <grid id="myGrid" sizedByContent="true" span="true" sclass="z-sticky-header" width="100%" style="border: 1px #D3D3D3 solid; white-space: normal; "> <auxhead> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Jenis Bantuan" rowspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Kategori Jabatan" rowspan="2" /> <auxheader align="center" style="background: #f0f0f0; text-transform:uppercase; " label="Nilai Bantuan Sesuai Sop" rowspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JAN" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="FEB" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="MAR" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="APR" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="MAY" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUN" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUL" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="AUG" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="SEP" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="OCT" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="NOV" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="DEC" colspan="2" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="TOTAL" rowspan="2" /> </auxhead> <auxhead> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="JUMLAH KARYAWAN PENERIMA BANTUAN" /> <auxheader align="center" sclass="table-header" style="text-transform:uppercase; background: #f0f0f0" label="Total Harga" /> </auxhead> <columns sizable="false" visible="false"> <column width="250px" sclass="table-header" align="center" /> <column width="175px" sclass="table-header" align="center" /> <column width="175px" sclass="table-header" align="center" /> <column width="@load(vm.widthQ1)" sclass="table-header" align="center" visible="@load(vm.flagQ1)" /> <column width="@load(vm.widthQ1)" sclass="table-header" align="center" visible="@load(vm.flagQ1)"/> <column width="@load(vm.widthQ1)" sclass="table-header" align="center" visible="@load(vm.flagQ1)" /> <column width="@load(vm.widthQ1)" sclass="table-header" align="center" visible="@load(vm.flagQ1)" /> <column width="@load(vm.widthQ1)" sclass="table-header" align="center" visible="@load(vm.flagQ1)" /> <column width="@load(vm.widthQ1)" sclass="table-header" align="center" visible="@load(vm.flagQ1)" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="200px" sclass="table-header" align="center" /> <column width="150px" sclass="table-header" align="center" /> <column width="175px" sclass="table-header" align="center" /> </columns> <rows> <template name="model"> <row visible="@load(each.visible)"> <cell align="center" style="border: 1px solid #cfcfcf;"> <!-- "@load(each.var1) @save(each.var1)" --> <combobox width="100%" placeholder="PILIH JENIS BANTUAN" selectedItem="@bind(each.lov1)" onSelect="@command('onSelectJenisBantuan', index=forEachStatus.index)" model="@load(vm.jenisBantuanList)" disabled="@load(!vm.enableFormControl)" readonly="true"> <template name="model" var="bantuan"> <comboitem label="@load(bantuan.value)" value="@save(bantuan.id)" /> </template> </combobox> </cell> <cell align="center" style="border: 1px solid #cfcfcf;"> <!-- "@load(each.var2) @save(each.var2)" --> <combobox width="100%" placeholder="${labels.pilih } ${labels.jabatan }" selectedItem="@bind(each.lov2) @load(each.lov2, after='onSelectCategoryJabatan')" onSelect="@command('onSelectCategoryJabatan', index=forEachStatus.index)" model="@load(each.categoryJabatanList)" disabled="@load(!vm.enableFormControl)" readonly="true"> <template name="model" var="jabatan"> <comboitem label="@load(jabatan.value)" value="@save(jabatan.id)" /> </template> </combobox> </cell> <cell align="right" style="border: 1px solid #cfcfcf;"> <label width="100%" value="@bind(each.num1) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-1" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num2) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum1) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-2" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num3) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum2) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-3" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num4) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum3) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-4" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num5) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum4) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-5" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num6) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum5) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-6" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num7) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum6) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-7" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num8) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum7) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-8" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num9) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum8) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-9" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num10) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum9) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-10" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num11) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum10) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-11" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num12) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum11) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="left" sclass="moveArrowKey col-12" style="border: 1px solid #cfcfcf;"> <textbox width="100%" disabled="@load(!vm.enableFormControl)" onOK="@command('calculateTotal', mode=0)" sclass="numericOnly maxLength4 moveArrowKeyField" value="@bind(each.num13) @converter('nullSafeNumberConverter', format='#,##0')" style="text-align: right; resize: none;" /> </cell> <cell align="right" sclass="moveArrowKey" style="border: 1px solid #cfcfcf;"> <label width="100%" sclass="moveArrowKeyField" value="@load(each.sum12) @converter('nullSafeNumberConverter', format='#,##0')" /> </cell> <cell align="right" style="border: 1px solid #cfcfcf; background: #f0f0f0;"> <label value="@load(each.num14) @converter('nullSafeNumberConverter', format='#,##0')" style="background: #f0f0f0; text-align: right;" /> </cell> </row> </template> </rows> <foot> <footer span="3" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right " value="${labels.total }" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum1) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum2) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum3) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum4) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum5) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum6) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum7) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum8) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum9) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum10) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum11) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" span="2" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.sum12) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> <footer align="right" style="border: 1px solid #cfcfcf;"> <label style="font-weight: bold; text-align: right;" value="@bind(vm.opexDtlFooter.num2) @converter('nullSafeNumberConverter', format='#,##0')" /> </footer> </foot> </grid> </window> </zk> MyComposer.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.*; import org.zkoss.bind.BindUtils; import org.zkoss.bind.annotation.BindingParam; import org.zkoss.bind.annotation.Command; import org.zkoss.bind.annotation.GlobalCommand; import org.zkoss.bind.annotation.Init; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Executions; public class MyComposer { private Window myWindow; private Grid myGrid; public boolean flagQ1 = false; public boolean flagQ2 = false; public boolean flagQ3 = false; public boolean flagQ4 = false; public String widthQ1 = "0px"; public String widthQ2 = "0px"; public String widthQ3 = "0px"; public String widthQ4 = "0px"; public String styleQ1; public String styleQ2; public String styleQ3; public String styleQ4; public String widthQ1Temp = ""; public String widthQ2Temp = ""; public String widthQ3Temp = ""; public String widthQ4Temp = ""; @Init public void init () { initExpandCollapse(); } public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); myWindow.setWidth("500px"); myGrid.setWidth("400px"); initExpandCollapse(); } public void initExpandCollapse() { flagQ1 = true; flagQ2 = true; flagQ3 = true; flagQ4 = true; styleQ1 = "background: #b1191B;"; styleQ2 = "background: #b1191B;"; styleQ3 = "background: #b1191B;"; styleQ4 = "background: #b1191B;"; widthQ1 = "175px"; widthQ2 = "175px"; widthQ3 = "175px"; widthQ4 = "175px"; BindUtils.postNotifyChange(null, null, this, "flagQ1"); BindUtils.postNotifyChange(null, null, this, "flagQ2"); BindUtils.postNotifyChange(null, null, this, "flagQ3"); BindUtils.postNotifyChange(null, null, this, "flagQ4"); BindUtils.postNotifyChange(null, null, this, "widthQ1"); BindUtils.postNotifyChange(null, null, this, "widthQ2"); BindUtils.postNotifyChange(null, null, this, "widthQ3"); BindUtils.postNotifyChange(null, null, this, "widthQ4"); BindUtils.postNotifyChange(null, null, this, "styleQ1"); BindUtils.postNotifyChange(null, null, this, "styleQ2"); BindUtils.postNotifyChange(null, null, this, "styleQ3"); BindUtils.postNotifyChange(null, null, this, "styleQ4"); } @Command("onClickQ1") public void onClickQ1() { flagQ1 = flagQ1 == true ? false : true; if (!flagQ1) { widthQ1Temp = widthQ1; widthQ1 = "0px"; } else { widthQ1 = widthQ1Temp; } styleQ1 = flagQ1 == true ? "background: #b1191B;" : "background: #304c5c;"; BindUtils.postNotifyChange(null, null, this, "flagQ1"); BindUtils.postNotifyChange(null, null, this, "widthQ1"); BindUtils.postNotifyChange(null, null, this, "styleQ1"); } /** * set visible for apr, may, jun * * @author albym * 13 september 2022 */ @Command("onClickQ2") public void onClickQ2() { flagQ2 = flagQ2 == true ? false : true; if (!flagQ2) { widthQ2Temp = widthQ2; widthQ2 = "0px"; } else { widthQ2 = widthQ2Temp; } styleQ2 = flagQ2 == true ? "background: #b1191B;" : "background: #304c5c;"; BindUtils.postNotifyChange(null, null, this, "flagQ2"); BindUtils.postNotifyChange(null, null, this, "widthQ2"); BindUtils.postNotifyChange(null, null, this, "styleQ2"); } /** * set visible for jul, aug, sep * * @author albym * 13 september 2022 */ @Command("onClickQ3") public void onClickQ3() { flagQ3 = flagQ3 == true ? false : true; if (!flagQ3) { widthQ3Temp = widthQ3; widthQ3 = "0px"; } else { widthQ3 = widthQ3Temp; } styleQ3 = flagQ3 == true ? "background: #b1191B;" : "background: #304c5c;"; BindUtils.postNotifyChange(null, null, this, "flagQ3"); BindUtils.postNotifyChange(null, null, this, "widthQ3"); BindUtils.postNotifyChange(null, null, this, "styleQ3"); } /** * set visible for oct, nov, dec * * @author albym * 13 september 2022 */ @Command("onClickQ4") public void onClickQ4() { flagQ4 = flagQ4 == true ? false : true; if (!flagQ4) { widthQ4Temp = widthQ4; widthQ4 = "0px"; } else { widthQ4 = widthQ4Temp; } styleQ4 = flagQ4 == true ? "background: #b1191B;" : "background: #304c5c;"; BindUtils.postNotifyChange(null, null, this, "flagQ4"); BindUtils.postNotifyChange(null, null, this, "widthQ4"); BindUtils.postNotifyChange(null, null, this, "styleQ4"); } public void onClick$btnQ1(Event e) throws InterruptedException{ flagQ1 = flagQ1 == true ? false : true; if (!flagQ1) { widthQ1Temp = widthQ1; widthQ1 = "0px"; } else { widthQ1 = widthQ1Temp; } styleQ1 = flagQ1 == true ? "background: #b1191B;" : "background: #304c5c;"; BindUtils.postNotifyChange(null, null, this, "flagQ1"); BindUtils.postNotifyChange(null, null, this, "widthQ1"); BindUtils.postNotifyChange(null, null, this, "styleQ1"); } public void onClick$btnQ2(Event e) throws InterruptedException{ flagQ2 = flagQ2 == true ? false : true; if (!flagQ2) { widthQ2Temp = widthQ2; widthQ2 = "0px"; } else { widthQ2 = widthQ2Temp; } styleQ2 = flagQ2 == true ? "background: #b1191B;" : "background: #304c5c;"; BindUtils.postNotifyChange(null, null, this, "flagQ2"); BindUtils.postNotifyChange(null, null, this, "widthQ2"); BindUtils.postNotifyChange(null, null, this, "styleQ2"); } public void onClick$btnQ3(Event e) throws InterruptedException{ flagQ3 = flagQ3 == true ? false : true; if (!flagQ3) { widthQ3Temp = widthQ3; widthQ3 = "0px"; } else { widthQ3 = widthQ3Temp; } styleQ3 = flagQ3 == true ? "background: #b1191B;" : "background: #304c5c;"; BindUtils.postNotifyChange(null, null, this, "flagQ3"); BindUtils.postNotifyChange(null, null, this, "widthQ3"); BindUtils.postNotifyChange(null, null, this, "styleQ3"); } public void onClick$btnQ4(Event e) throws InterruptedException{ flagQ4 = flagQ4 == true ? false : true; if (!flagQ4) { widthQ4Temp = widthQ4; widthQ4 = "0px"; } else { widthQ4 = widthQ4Temp; } styleQ4 = flagQ4 == true ? "background: #b1191B;" : "background: #304c5c;"; BindUtils.postNotifyChange(null, null, this, "flagQ4"); BindUtils.postNotifyChange(null, null, this, "widthQ4"); BindUtils.postNotifyChange(null, null, this, "styleQ4"); } }