?? databindgrid.zul
字號:
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?> <zk><zscript src="Person.zs"/><window id="mainwin" xmlns:a="http://www.zkoss.org/2005/zk/annotation"> <a:bind model="personList"/> <grid width="800px" height="200px"> <columns> <column width="200px"/> <column width="200px"/> <column width="200px"/> <column width="200px"/> </columns> <rows> <a:bind _var="person"/> <row> <a:bind value="person.firstName"/> <textbox id="fn"/> <a:bind value="person.lastName"/> <textbox id="ln"/> <a:bind value="person.fullName"/> <label maxlength="20"/> <a:bind model="emailList" selectedItem="person.email"/> <listbox mold="select" rows="1"> <a:bind _var="email" label="email"/> <listitem/> </listbox> </row> </rows> </grid> <zscript> //prepare collection list setupPerson(Person person, int j) { person.setFirstName("First"+j); person.setLastName("Last"+j); person.setEmail("email"+j+"@potix.com"); } //prepare the example person List int count = 30; List personList = new ArrayList(); for(int j= 0; j < count; ++j) { Person personx = new Person(); if (j == 1) { personx.setAddress(new Address()); selected = personx; } setupPerson(personx, j); personList.add(personx); } //prepare email list Set emailList = new LinkedHashSet(); for(int j= 0; j < count; ++j) { emailList.add("email"+j+"@potix.com"); } </zscript></window></zk>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -