I got parse error exception when I try to use with nested . Can Span tag use along with nested loop?
Subunit | Fiber | IL | RL | XX | RL
-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+--------+----------+----+-----------------------------------
<jt:span factor="${wo.serialNumbers.size}" value="${wo.id}"/>|<jt:forEach items="${workOrders}" var="wo"><jt:forEach items="${wo.serialNumbers}" var="sn">${sn.fiber}|${sn.il}|${sn.rl_a}| XX |${sn.rl_b}</jt:forEach><jt:forEach>
Yes, a
jt:span
tag can be used along side ajt:forEach
, even if it's nested. The error you're getting is most likely because you're referencing the variablewo
in thejt:span
tag on the left from outside of thejt:forEach
loop it's defined in, which is the cells to the right.If you plan to have multiple
span
tags, one for each work order, then include it in the body of the outerjt:forEach
tag. Move the outerjt:forEach
tag to the beginning of the leftmost cell.This will make
wo
be in scope in the outerjt:forEach
tag and produce thespan
s for the innerjt:forEach
tags.