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

Listbox doesn't keep selection after switching pages with org.zkoss.zul.listbox.checkmarkDeselectOthers enabled (true)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 8.0.3
    • 8.0.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.3 S3
    • None

      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 item's checkmark (insteaf of a listitem itself) , selection count is 1
      4. switch to the next page click the 1st item's checkmark

      result

      selection count is 1
      because Listbox clears the previous selection.

      expected result

      selection count is 2

      debug info

      • this issue doesn't happen in 7.0.8 and happens since 8.0.0
      • Cannot disable org.zkoss.zul.listbox.checkmarkDeselectOthers with <custom-attribute> for the implementation

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

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h