<c:forEach> 0 、1、2、3、4、5
内部<c:forEach> 0 、1
```
<c:forEach items="${distributorId}" var="did">
<c:choose>
<c:when test="${distributor.id == did}">
删除。。。
</c:when>
<c:otherwise>
添加
</c:otherwise>
</c:choose>
</c:forEach>
如何让0、1列显示删除按钮,求他列显示添加按钮,
c:when比较的,因为内部还有一层比较,会显示两个添加按钮,
或者显示一个删除和一个添加,逻辑没处理好,求思路
想到解决办法了。。。。
<c:forEach items="${distributorId}" var="did">
<c:choose>
<c:when test="${distributor.id == did}">
<c:set var="flag" value="true"></c:set>
</c:when>
</c:choose>
</c:forEach>
<c:choose>
<c:when test="${empty flag}">
添加
</c:when>
<c:otherwise>
删除
</c:otherwise>
</c:choose>
c:when比较的,因为内部还有一层比较,会显示两个添加按钮,
对这个不是很懂。你把你代码贴出来看看