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

<forEach> doesn't support a primitive array

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 9.6.0
    • 8.0.0
    • Databind 2
    • None

      Steps to Reproduce

      <zk>
        <zscript>
        int[] names = {1,2,3,4,5};
        </zscript>
        <forEach items="${names}">
           ${each}
        </forEach>
      </zk>
      

       

      Current Result

      Prints nonsense 0.
       

      Expected Result

      Prints 1 2 3 4 5.
       

      Debug Information

       

      Workaround

      Use Integer[]
       

            rudyhuang rudyhuang
            rudyhuang rudyhuang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 4 hours
                4h
                Logged:
                Time Spent - Not Specified
                Not Specified