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

📄 b30-1894885.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<?xml version="1.0" encoding="UTF-8"?><!--B30-1894885.zul{{IS_NOTE	Purpose:			Description:			History:		Mon Feb 18 17:00:50 TST 2008, Created by jumperchen}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?><zk xmlns:n="http://www.zkoss.org/2005/zk/native">	<n:p>Grid alignment problem.</n:p><n:p>The following code shows the grid alignment when databinding one row. Whendisplayed, click on the "Add new Dummy" ONE time and you will see theproblem in the row added. When adding a second row it (the grid)straightens itself out:</n:p><window id="prods" title="Vboxing">	<zscript>		import java.util.List; import java.util.ArrayList; List myList =		new ArrayList(); String[] vs = new String[4]; vs[0] = "gimpy";		vs[1] = "dimpy"; vs[2] = "slimpy"; vs[3] = "fimpy";		int calcwidth() { int w = vs.length; int z =		Integer.parseInt(prods.getWidth()); int x = z/w; String s = new		String("Len "+vs.length+" width "+prods.getWidth()); alert(s);		return x; };		public class Dummy { public String val1 = "Hello"; public String		val2 = "Cruel"; public String val3 = "World"; };		public void addDummy() { myList.add(new Dummy());		binder.loadAll(); };	</zscript>	<vbox>		<button label="Add new Dummy" onClick="addDummy()" />		<grid model="@{myList}" width="600px">			<columns>				<column label="One" />				<column label="Two" />				<column label="Three" />			</columns>			<rows>				<row self="@{each=dummy}">					<label value="@{dummy.val1}" />					<label value="@{dummy.val2}" />					<label value="@{dummy.val3}" />				</row>			</rows>		</grid>	</vbox></window></zk>

⌨️ 快捷键说明

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