-
Bug
-
Resolution: Fixed
-
Normal
-
6.5.1, 6.0.4
-
Security Level: Jimmy
-
None
When using ListModelList<String> in chosenbox, everything is fine. But if using ListModelList<Bean>, the input value will clear after click test button.
<zk> <zscript><![CDATA[ import java.util.*; import org.zkoss.zul.*; public class Shop { private Integer id; private String nameShop; public Shop(Integer id, String nameShop) { this.id = id; this.nameShop = nameShop; } public Integer getId() { return id; } public String getNameShop() { return nameShop; } public String toString() { return nameShop; } } List listShop = new ArrayList(); for (int i = 0; i < 100; i++) listShop.add(new Shop(i, "SHOP - " + i)); ListModelList model = new ListModelList(listShop); ]]></zscript> <window title="Chosen Box" border="normal"> <chosenbox id="cb" model="${model}" width="400px" noResultsText="No such item - {0}" /> <button label="test" onClick="alert(cb.getSelectedObjects())" /> </window> </zk>