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

Checkmark in listheader is checked when nothing in the listbox

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.5.3
    • Fix Version/s: 7.0.1
    • Component/s: None
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: