📄 f35-1972591.zul
字号:
<?xml version="1.0" encoding="UTF-8"?>
<!--
F31-1972591.zul
{{IS_NOTE
Purpose:
Description:
History:
Mon May 26 16:21:06 TST 2008, Created by robbiecheng
}}IS_NOTE
Copyright (C) 2008 Potix Corporation. All Rights Reserved.
{{IS_RIGHT
}}IS_RIGHT
-->
<zk>
Grid support Groupfoot in Group
<zscript><![CDATA[//@IMPORT
import org.zkoss.zkdemo.userguide.*;
]]>
<![CDATA[
Comparator asc = new RowLabelComparator(true),
dsc = new RowLabelComparator(false);
]]>
</zscript>
<grid id="grid">
<columns id="h" sizable="true">
<column id="col1" label="Type" sortAscending="${asc}" sortDescending="${dsc}"/>
<column id="col2" label="Content"/>
</columns>
<rows id="rows">
<group id="gp1">
<label value="Group1: (gp1)"/>
<label value="Group1:"/>
</group>
<row>
<label value="File:"/>
<label value="File:"/>
</row>
<row id="row1">
<label value="Type:"/>
<hbox>
<listbox rows="1" mold="select">
<listitem label="Java Files,(*.java)"/>
<listitem label="All Files,(*.*)"/>
</listbox>
<button label="Browse..."/>
</hbox>
</row>
<groupfoot> <label value="2 Java Files"/>
<label value="10 Files"/>
</groupfoot>
<group id="gp2" label="Group 2 (gp2)" onOpen='alert("Group is open: "+self.open);'/>
<row>
<label value="Options:"/>
<label value="Options:"/>
</row>
<groupfoot>
<label value="2 Options"/>
<label value="10 Options"/>
</groupfoot>
</rows>
</grid>
<zscript><![CDATA[
String[][] datas = new String[4][];
datas[0] = new String[15];
datas[1] = new String[14];
datas[2] = new String[27];
datas[3] = new String[33];
for(int j=0; j<datas[0].length; ++j) {
datas[0][j] = j+"A option "+j;
}
for(int j=0; j<datas[1].length; ++j) {
datas[1][j] = j+"B option "+j;
}
for(int j=0; j<datas[2].length; ++j) {
datas[2][j] = j+"C option "+j;
}
for(int j=0; j<datas[3].length; ++j) {
datas[3][j] = j+"D option "+j;
}
GroupsModel model3 = new SimpleGroupsModel(datas,new String[]{"Group A","Group B","Group C","Group D"},new String[]{"Foot A","Foot B","Foot C","Foot D"});
]]></zscript>
Live Model
<grid width="200px" model="${model3}">
<columns>
<column label="Load on Demend (Grid)"/>
</columns>
</grid>
</zk>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -