-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
Security Level: Jimmy
-
None
http://screencast.com/t/Qwr4Jd93WB
<zk> <zscript><![CDATA[ class Item { private String name; public Item(String name) { this.name = name; } public String getName() { return name; } } class Product { private Item item; public Product(Item item) { this.item = item; } public Item getItem() { return item; } public void setItem(Item item) { this.item = item; } } class MyVM { private List list; private Product product; public MyVM() { list = new ArrayList(); list.add(new Item("Item 1")); list.add(new Item("Item 2")); list.add(new Item("Item 3")); } public List getList() { return list; } public Product getProduct() { return product; } public void setProduct(Product product) { this.product = product; } } ]]></zscript> <window apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('MyVM')"> <div form="@id('fx')@load(vm.product)"> <vlayout> <div> fx.item: <label value="@load(fx.item)"/> </div> <div> fx.item.name: <label value="@load(fx.item.name)"/> </div> </vlayout> <combobox model="@load(vm.list)" selectedItem="@bind(fx.item)"> <template name="model" var="item"> <comboitem label="@load(item.name)"/> </template> </combobox> </div> </window> </zk>