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

Listgroups are selected by the selectAll checkmark in listbox

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.2
    • 8.0.5
    • None
    • Security Level: Jimmy
    • None

      Steps to Reproduce

      http://zkfiddle.org/sample/2m2ij5s/3-Select-all-select-group-and-groupfoot
      run fiddle
      Use the select all checkmark

      Current Result

      All listitems and listgroups and listgroupfoot are selected

      Expected Result

      Only listitems should be selected

      Debug Info

      Listbox / groupsmodel default selection control don't tag listgroup and listgroupfoot as non selectable, even though they are not data items

      Root Cause

      Workaround

      <script><![CDATA[
      zk.afterLoad('zul.sel', function() {
      var xListbox = {};
      zk.override(zul.sel.Listbox.prototype, xListbox ,{
      selectAll: zkf= function (notify, evt)

      { for (var it = this.getBodyWidgetIterator(), w; (w = it.next());) if (w._loaded && !w.isDisabled() && w.isSelectable() && !(w.className == "zkex.sel.Listgroup" || w.className == "zkex.sel.Listgroupfoot")) this._changeSelect(w, true); if (notify && evt !== true) this.fireOnSelect(this.getSelectedItem(), evt); }

      ,
      setSelectAll: zkf
      });//zk.override
      });//zk.afterLoad
      ]]></script>

            CharlesQiu CharlesQiu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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