?? b30-1894885.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 + -