📄 listgroup.zul
字号:
<?xml version="1.0" encoding="UTF-8"?><!--listgroup.zul{{IS_NOTE Purpose: Description: History: Mon Oct 13 12:47:47 2008, Created by jumperchen}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window title="Test of Listgroup's Serialization"><vbox id="vb"> <style dynamic="true"> .cells td { border-bottom: 1px solid #BFDBF5; } </style> <zscript> String[][] datas = new String[][]{ // Today new String[]{"SourceForge.net","[zk1 - Help] RE: ZK problem in dynamic menu","2008/4/29 15:47:27","12KB"}, new String[]{"SourceForge.net","[zk1 - Help] RE: FileUpload","2008/4/29 15:37:57","14KB"}, new String[]{"SourceForge.net","[zk1 - Help] RE: Datebox format","2008/4/29 15:27:31","11KB"}, new String[]{"SourceForge.net","[zk1 - Help] FileUpload","2008/4/29 14:07:25","11KB"}, new String[]{"SourceForge.net","[zk1 - General] RE: Opening more than one new browser window","2008/4/29 13:44:17","12KB"}, // Yesterday new String[]{"SourceForge.net","[zk1 - Help] RE: SelectedItemConverter Question","2008/4/28 13:31:12","14KB"}, new String[]{"SourceForge.net","[zk1 - Help] RE: Times_Series Chart help","2008/4/28 13:26:37","14KB"}, new String[]{"SourceForge.net","[zk1 - Help] RE: SelectedItemConverter Question","2008/4/28 10:14:27","14KB"}, // Sunday new String[]{"SourceForge.net","[zk1 - General] RE: Opening more than one new browser window","2008/4/27 13:44:17","12KB"}, new String[]{"SourceForge.net","[zk1 - Help] RE: SelectedItemConverter Question","2008/4/27 13:31:12","14KB"}, new String[]{"SourceForge.net","[zk1 - Help] RE: Times_Series Chart help","2008/4/27 13:26:37","14KB"}, }; </zscript> <listbox width="600px" id="listgroup" fixedLayout="true" oddRowSclass=""> <listhead sizable="true"> <listheader width="150px" label="From" sort="auto" /> <listheader label="Subject" sort="auto" /> <listheader width="150px" label="Received" sort="auto" /> <listheader width="50px" label="Size" sort="auto" /> </listhead> <listgroup> <listcell label="Date:Today [From]"/> <listcell label="[Subject]"/> <listcell label="[Received]"/> <listcell label="[Size]"/> </listgroup> <listitem forEach="${datas}" forEachBegin="0" forEachEnd="4" sclass="cells"> <listcell label="${each[0]}" image="/img/mail_read.png" style="padding-left: 10px" /> <listcell label="${each[1]}" /> <listcell label="${each[2]}" /> <listcell label="${each[3]}" /> </listitem> <listgroupfoot> <listcell label="5 emails" style="padding-left: 10px" /> <listcell label="zk1"/> <listcell label="2008/4/29"/> <listcell label="60KB"/> </listgroupfoot> <listgroup label="Date:Yesterday" /> <listitem forEach="${datas}" forEachBegin="5" forEachEnd="7" sclass="cells"> <listcell label="${each[0]}" image="/img/mail_read.png" style="padding-left: 10px" /> <listcell label="${each[1]}" /> <listcell label="${each[2]}" /> <listcell label="${each[3]}" /> </listitem> <listgroupfoot> <listcell label="3 emails" style="padding-left: 10px" /> <listcell label="zk1"/> <listcell label="2008/4/28"/> <listcell label="42KB"/> </listgroupfoot> <listgroup label="Date:Sunday" /> <listitem forEach="${datas}" forEachBegin="8" forEachEnd="10" sclass="cells"> <listcell label="${each[0]}" image="/img/mail_read.png" style="padding-left: 10px" /> <listcell label="${each[1]}" /> <listcell label="${each[2]}" /> <listcell label="${each[3]}" /> </listitem> <listgroupfoot> <listcell label="3 emails" style="padding-left: 10px" /> <listcell label="zk1"/> <listcell label="2008/4/27"/> <listcell label="40KB"/> </listgroupfoot> </listbox> <zscript> int cnt = 0; </zscript> <button label="Clone"> <attribute name="onClick">{ Object l = listgroup.clone(); l.setId("dst" + ++cnt); vb.insertBefore(l, self); }</attribute> </button> <button label="Clone by Serialization"> <attribute name="onClick">{ import java.io.*; ByteArrayOutputStream boa = new ByteArrayOutputStream(); new ObjectOutputStream(boa).writeObject(listgroup); byte[] bs = boa.toByteArray(); Object l = new ObjectInputStream(new ByteArrayInputStream(bs)).readObject(); l.setId("dst" + ++cnt); vb.insertBefore(l, self); vb.insertBefore(new Label(bs.length+" bytes copied"), self); }</attribute> </button></vbox></window>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -