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

📄 databindgrid.zul

📁 ZK是一个Ajax Java Web框架
💻 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 &lt; 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 &lt; count; ++j) {    emailList.add("email"+j+"@potix.com");  }	</zscript></window></zk>

⌨️ 快捷键说明

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