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

clicking select-all checkbox in a Listbox doesn't select all items

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.5.0
    • 8.5.2.1, 9.0.1.2
    • None
    • Security Level: Jimmy
    • None
    • ZK 9.5.0 S1
    • None

      Steps to Reproduce

      run the select-all.zul
      1. click the select-all checkbox
      2. deselect 1 item.
      the select-all checkbox is unchecked now.
      3. click select-all

      Current Result

      all selections are cleared

      Expected Result

      select all items since the select-all checkbox is unchecked

      Debug Information

      if you do the steps :
      1. select 1st item
      2. select-all
      The result is:

      all items selected

      the problem is:

      Under the partially selected condition, clicking select-all checkbox might select all items or deselect all items which is not a clear behavior. Because current behavior works like a switch, it doesn't change its internal checked status according to all items' checked status. But the checkmark element will change between checked and unchecked. This is a conflict.

      Proposed Spec.

      1. When the select-all checkbox is unchecked, click it to select all items.
      2. When the select-all checkbox is checked, click it to deselect all items.
      3. only when all listitems are checked, the select-all checkbox is checked.

      I have implemented a prototype in the attached js.

        1. zk-4606.js
          1 kB
        2. select-all-wa.zul
          1 kB
        3. select-all.zul
          0.6 kB

            Leon03 Leon03
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 day, 4 hours
                1d 4h
                Remaining:
                Remaining Estimate - 1 day, 4 hours
                1d 4h
                Logged:
                Time Spent - Not Specified
                Not Specified