⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 b30-1849239.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<?xml version="1.0" encoding="UTF-8"?>

<window>
<html><![CDATA[
1. Press button "Insert at index 0", this program will insert a new Listitem at index 0.<br/>
2. The new inserted item should be always the first child of the Listbox but it is not.<br/>
3. You can check the sequence of Listitem.getItems() by pressing the button "Listitem.getItems()" and it is correct.<br/>
4. The issue should be in the ZK client engine.<br/>
5. Take away the &lt;listhead> will make it works correct so it has something to do with the &lt;listhead>.<br/>
]]></html>
<listbox id="lbx">
	<listhead>
		<listheader label="header"/>
	</listhead>
	<listitem label="Mark"/>
</listbox>
<zscript>
 int x = 0;
</zscript>
<button label="Insert at index 0">
	<attribute name="onClick">
	Listitem li = new Listitem("NewItem"+ ++x);
	lbx.insertBefore(li, lbx.getItemAtIndex(0));
	</attribute>
</button>
<button label="Listitem.getItems()">
	<attribute name="onClick"><![CDATA[
		StringBuffer sb = new StringBuffer(124);
		for(Iterator it = lbx.getItems().iterator(); it.hasNext();) {
			Listitem li = (Listitem) it.next();
			sb.append(li.getLabel()+",");
		}
		alert(sb.toString());
	]]></attribute>
</button>

</window>

⌨️ 快捷键说明

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