b30-1926480.zul

来自「ZK是一个Ajax Java Web框架」· ZUL 代码 · 共 70 行

ZUL
70
字号
<?xml version="1.0" encoding="UTF-8"?><!--B30-1926480.zul{{IS_NOTE	Purpose:			Description:			History:		Mon Mar 31 16:25:02 TST 2008, Created by jumperchen}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><zk xmlns:n="http://www.zkoss.org/2005/zk/native">	<n:ol>		<n:li>First of all, click the "name" header, and then the layout of listbox should not be affected (the layout isn't gone).</n:li>		<n:li>Try to click the button of "add Listheader to end", "add Listheader to first", and "delete Listheader", then the layout of listbox should be formal.</n:li>	</n:ol>	<listbox id="list" width="250px" fixedLayout="true">		<listhead sizable="true">			<listheader label="name" onClick='self.label = "Header1"'				style="border: 1px solid red;" />			<listheader label="gender" sort="auto"/>		</listhead>		<listitem>			<listcell label="Mary" />			<listcell label="FEMALE" />		</listitem>		<listitem>			<listcell label="John" />			<listcell label="MALE" />		</listitem>		<listitem>			<listcell label="Jane" />			<listcell label="FEMALE" />		</listitem>		<listitem>			<listcell label="Henry" />			<listcell label="MALE" />		</listitem>		<listfoot>		<listfooter label="Footer1"/>		<listfooter label="Footer2"/>		</listfoot>	</listbox>	<button label="add Listheader to end">		<attribute name="onClick">			new Listheader("Test").setParent(list.getListhead());		</attribute>	</button>	<button label="add Listheader to first">		<attribute name="onClick">			list.getListhead().insertBefore(new Listheader("Test"), list.getListhead().getChildren().get(0));		</attribute>	</button>	<button label="delete Listheader">		<attribute name="onClick">			if (list.getListhead().getChildren().size() > 2)			((Listheader)list.getListhead().getChildren().get(0)).detach();			else alert("Nothing to do.");		</attribute>	</button></zk>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?