美文网首页
c:if判断两个c:forEach里的数据是否相等

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

作者: 李彬燊666 | 来源:发表于2020-07-09 16:27 被阅读0次

    不能直接: <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>

    相关文章

      网友评论

          本文标题:c:if判断两个c:forEach里的数据是否相等

          本文链接:https://www.haomeiwen.com/subject/xssscktx.html