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

Checkmark in listheader is checked when nothing in the listbox

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.1
    • 6.5.3
    • None

      Here is the zul to reproduce

      <div>
          <listbox width="300px" checkmark="true" multiple="true">
              <listhead>
                  <listheader>
                      <label value="Can an empty list be all selected?"/>
                  </listheader>
              </listhead>
          </listbox>
      </div>
      

      It looks like the due to the way _isAllSelected() implemented in SelectWidget

      	_isAllSelected: function () {
      		for (var it = this.getBodyWidgetIterator({skipHidden:true}), w; (w = it.next());)
      			if (!w.isDisabled() && !w.isSelected())
      				return false;
      		return true;
      	},
      

      When nothing exist, this function returns true, hence the checkbox is checked.

            danchen0720 danchen0720
            rangilin rangilin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: