Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-927

zkplus databinding1 should auto-wrapping BindingListModelXxx with setMultiple() and Selectable handled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.0.1
    • 6.0.0
    • Databind
    • None

      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>
      

            dennis dennis
            henrichen henrichen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: