-
Bug
-
Resolution: Fixed
-
Normal
-
5.0.8
-
None
Hlayout/Vlayout shall use fireDown() rather then fire() in syncSize()
Test case:
<zk> <zscript><![CDATA[ import java.util.ArrayList; ArrayList productList = new ArrayList(); ListModelList listModel = new ListModelList(); int i = 0; while (i < 5) { String p = new String("name" + i++); productList.add(p); } listModel.addAll(productList); RowRenderer render = new RowRenderer() { public void render(Row row, Object data) throws Exception { String p = (String) data; Hlayout l = new Hlayout(); l.appendChild(new Label("Label")); l.setParent(row); Div div = new Div(); div.setHflex("1"); div.setParent(row); } }; void setProdListModel(int amount) { int i = 0; productList.clear(); listModel.clear(); while (i < amount) { String p = new String("name" + i++); productList.add(p); } listModel.addAll(productList); } ]]></zscript> <window title="new page title" border="normal"> ListModelList Size: <intbox id="modelSize" value="50" /> <button label="change" id="button"> <attribute name="onClick"> setProdListModel(modelSize.getValue()); grdProductProductions.setModel(listModel); </attribute> </button> <grid width="100%" id="grdProductProductions" model="${listModel}" rowRenderer="${render}"> <columns sizable="true"> <column label="total" align="left" /> <column label="obver" align="center" /> </columns> </grid> </window> </zk>