ZK 6 enahance the ListModelXxx to handle Selectable interface and multiple property; thus now user shall manipulate the ListModel directly to change the Listbox states. However, the old school databind 1 does not handle these enhancement accordingly when auto-wrapping BindingListModelXxx. Shall handle them properly.
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?> <zk> <zscript><![CDATA[ List list = new ArrayList(); for (int i = 0; i < 5; i++) list.add("item " + i); ListModelList model = new ListModelList(list); model.setMultiple(true); ]]></zscript> <listbox width="150px" model="@{model}" multiple="true" checkmark="true"> <listhead> <listheader label="col"/> </listhead> <listitem self="@{self=item}" label="@{item}"/> </listbox> </zk>