描述:后台返回一个List,变量名叫channelList,jsp页面要循环显示,如果channelList.PLATFORM_FIRST_DISCOUNT值为null时状态为不选择,反之选择。
<c:forEach var="channelList" items="${channelList}">
<p>
<c:choose>
<c:when test="${not empty channelList.PLATFORM_FIRST_DISCOUNT}">
<input type="checkbox" name="channelInfo" value="${channelList.ROW_ID}" checked>${channelList.SOURCE_NAME}
</c:when>
<c:otherwise>
<input type="checkbox" name="channelInfo" value="${channelList.ROW_ID}">${channelList.SOURCE_NAME}
</c:otherwise>
</c:choose>
</p>
</c:forEach>