-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
-
Security Level: Jimmy
-
None
-
ZK 8.6.0 S1
-
None
Steps to Reproduce
http://zkfiddle.org/sample/39mq57t/3-fragment-forEach
using fragment with forEach with begin / end:
<forEach begin="0" end="3"> <button label="@load(each)"/> </forEach>
Current Result
Error in JS console:
Expected Result
fragment should iterate on the variable as when using shadow forEach in java / zul
Debug Info
The JS code breaks because the "items" attribute is undefined.
The zk$$forEach method tries to access items.length wich causes a NPE at client side.
https://github.com/zkoss/zkcml/blob/35ee33e1f1f7a5357598d36c3adde3a5b153c82c/zkmax/src/archive/web/js/zkmax/wgt/Fragment.js#L184