📄 b30-1941947.zul
字号:
<?xml version="1.0" encoding="UTF-8"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?>
<window width="500px">
<html><![CDATA[
<p>
1. You should see "Cat1" in first textbox and followed by three same
listboxes (Name0 ~ Name3).<br/>
2. Change "Cat1" to "Cat2" and press "tab" key to tab away the
textbox.<br/>
3. It is a BUG if you see an alert window complains <br/>
"Cannot find associated CollectionItem: <Listbox ...>"<br/>
4. It is OK if no such alert window.<br/>
</p>
]]></html>
<zscript><![CDATA[
public class Persons {
private String category = "Cat1";
private String[] names = new String[4];
public Persons() {
for (int j = 0; j < names.length; ++j)
names[j] = "Name"+j;
}
public String[] getNames() {
return this.names;
}
public void setCategory(String cat) {
this.category = cat;
}
public String getCategory() {
return this.category;
}
}
Persons persons = new Persons();
Object[] manypersons = new Object[3];
]]></zscript>
<textbox rows="1" cols="25" sclass="reg"
value="@{persons.category}"/>
<grid id="commodityItemsGrid" height="200px" model="@{manypersons}">
<rows>
<row self="@{each=count}">
<vbox>
<listbox mold="select" model="@{persons.names}">
<listitem self="@{each=name}" label="@{name}" />
</listbox>
</vbox>
</row>
</rows>
</grid>
</window>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -