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

Listheader group only check listcell label, never child if no label

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: 8.6.1
    • Fix Version/s: 8.6.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.6.2 S1, ZK 8.6.2 S2

      Description

      Steps to Reproduce

      Run fiddle:
      http://zkfiddle.org/sample/2jf1inu/8-Another-new-ZK-fiddle
      -on each listbox, click on the menupopup button on the top-right corner of the Listheader
      -click group

      Current Result

      in the 1st listbox, one group is created without any label
      in the 2nd listbox, 2 groups are created based on listcell labels

      Expected Result

      both listbox should find a label

      Debug Info

      caused by Listheader.group(boolean)
      https://github.com/zkoss/zk/blob/master/zul/src/org/zkoss/zul/Listheader.java#L570-L580

      if (cell.getLabel() != null) is always true due to LabelElement.getLabel() never returning null.
      (LabelElement.setLabel will convert null to "" automatically

      Root Cause

      else statement can not be reached under normal workflow

      Workaround

      use listcell label="" to set a label value

        Attachments

          Activity

            People

            • Assignee:
              DevChu DevChu
              Reporter:
              MDuchemin MDuchemin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: