我正在编写一个模板,并希望在语句中使用else if或continue语句。我在模板中有一个for循环,在for循环下,我有多个if条件,如果满足一个条件,我想跳过检查所有if条件,我尝试使用else if,但看起来jxls不支持,在jxls的模板for循环中使用else if或continue语句的任何其他方法。
<jx:forEach items="${liste}" var="a">
<jx:if test="${a.data==1}">
</jx :if>
<jx:if test="${a.data==2}">
</jx :if>
<jx:if test="${a.data==3}">
</jx :if>
</jx:forEach>发布于 2017-08-31 20:20:27
jxls使用jxls https://commons.apache.org/proper/commons-jexl/reference/syntax.html
例如,如果否则你可以使用三元运算
<jx:forEach items="${liste}" var="a">
${a.data == a || a.data == b || a.data == c ? 'yes': 'no'}
</jx:forEach>https://stackoverflow.com/questions/42127788
复制相似问题