码迷,mamicode.com
首页 > 其他好文 > 详细

<c:if>判断两个<c:forEach>里的数据是否相等

时间:2018-09-19 16:11:39      阅读:634      评论:0      收藏:0      [点我收藏+]

标签:lis   htm   detail   info   -name   http   foreach   store   inf   

技术分享图片

 

不能直接: <c:if test="${pickupInStoreTaskStatus.id}==${pickupInStore.status}">

或者:<c:if test="${ ${pickupInStoreTaskStatus.id} == ${pickupInStore.status} }">

代码:

<c:forEach items="${pickupList}" var="pickupInStore" varStatus="rows">
<spring:url value="recordDetail" var="viewPickupInStoreUrl" htmlEscape="false">
<spring:param name="code" value="${pickupInStore.code}"/>
</spring:url>
<div id="id-${rows.index}" class="pull-left">
<tbody>
<tr>
<td>${rows.index+1}&nbsp;</td>
<td>
<a popup-url="${viewPickupInStoreUrl}">
${fn:escapeXml(pickupInStore.code)}
</a>
</td>
<td>${fn:escapeXml(pickupInStore.arrivalTime)}&nbsp;</td>
<td>${fn:escapeXml(pickupInStore.vehicleNumber)}&nbsp;</td>
<td>${fn:escapeXml(pickupInStore.sender)}&nbsp;</td>
<td>${fn:escapeXml(pickupInStore.phoneNumber)}&nbsp;</td>
<td>${fn:escapeXml(pickupInStore.reserve)}&nbsp;</td>


<c:forEach items="${pickupinstoretask_status}" var="pickupInStoreTaskStatus">
<c:if test="${pickupInStoreTaskStatus.id==pickupInStore.status}">
<td> ${pickupInStoreTaskStatus.label}&nbsp;</td>
</c:if>
</c:forEach>



<td>${fn:escapeXml(pickupInStore.workOrderNumber)}&nbsp;</td>
<td>${fn:escapeXml(pickupInStore.workOrderStatus)}&nbsp;</td>
<td>${fn:escapeXml(pickupInStore.serviceConsultant)}&nbsp;</td>
<td>${fn:escapeXml(pickupInStore.closedReason)}&nbsp;</td>
</tr>
</tbody>
</div>

</c:forEach>

 

 

pickupInStoreTaskStatus.id

<c:if>判断两个<c:forEach>里的数据是否相等

标签:lis   htm   detail   info   -name   http   foreach   store   inf   

原文地址:https://www.cnblogs.com/shaun-sheng/p/9674622.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!