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

forEach element still creates components when you provide an empty list

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 8.0.4
    • Fix Version/s: 8.0.4.1
    • Component/s: None
    • Security Level: Jimmy
    • Labels:

      Description

      steps to reproduce

      1. load the attached file

      current result

      The each returns an integer 0 for an empty list on <forEach>

      debug info

      • this bug happens since 8.0.4. Previous versions don't have this bug.
      • it's critical to users because it will cause an exception like "Property 'name' not found on type java.lang.Integer". Since users usually access a property on each inside <forEach> like
        <forEach items="@load(vm.columnList)" >
        	<column
        		label="@load(each.dataType.name)"
        		width="150px" />
        </forEach>
        

        Attachments

          Activity

            People

            Assignee:
            DevChu DevChu
            Reporter:
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h