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

Listbox doesn't keep selection after deselecting an item with org.zkoss.zul.listbox.checkmarkDeselectOthers enabled (true)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Normal Normal
    • None
    • 7.0.8
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.3 S3

      steps to reproduce

      1. specify the property below in zk.xml
        <library-property>
               <name>org.zkoss.zul.listbox.checkmarkDeselectOthers</name>
               <value>true</value>
        </library-property>
        
      2. run the zul below
        <zk>
        	<listbox width="250px" height="100px" multiple="true" checkmark="true" mold="paging" pageSize="2"
                     onSelect="count.setValue(self.getSelectedCount());" onPaging="count.setValue(self.getSelectedCount());" >
               <listitem label="hello" />
               <listitem label="world" />
               <listitem label="hello" />
               <listitem label="you" />
        </listbox>
        <intbox id="count"  />
        </zk>
        
      3. click the 1st and 2nd item's checkmark (insteaf of a listitem itself) , selection count is 2
      4. switch to the next page click the 1st item's checkmark
      5. de-select the 1st item by clicking its checkmark

      result

      selection count is 0
      because Listbox clears the previous selection.

      expected result

      selection count is 2

            SEFI SEFI
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h