如何在前台界面遍历map集合中的list集合

因为长时间不使用这些jsp和css、div的东西了,基本上忘记了,现在用到了总结下:如何遍历后台传到前端的map集合中的list集合

看具体代码:

<c:when test="${not empty varList}">
                            <ul class="clearfix">
                                <c:forEach items="${varList}" var="map" varStatus="vs">
                                    <li>
                                        <div>
                                            <table id="divcss"  class="table table-striped table-bordered table-hover" style="margin-top:10px; margin-left: 70px" border="1">
                                                <tr id = "tableFont">
                                                    <th colspan="6" class='center font-size:40px;'>${map.key}</th>
                                                </tr>
                                                <tr>
                                                    <th class='center' height="10px" width="150px">序号</th>
                                                    <th class='center' height="10px" width="300px">标题</th>
                                                    <th class='center' height="10px" width="450px">提交者</th>
                                                    <th class='center' height="10px" width="150px">状态</th>
                                                    <th class='center' height="10px" width="150px">等级</th>
                                                    <th class='center' height="10px" width="400px">提交时间</th>
                                                </tr>
                                                <c:forEach items="${map.value}" var="var" varStatus="vs">
                                                    <tr>
                                                        <td class='center'>${vs.index+1}</td>
                                                        <td class='center'>${var.title}</td>
                                                        <td class='center'>${var.author}</td>
                                                        <td class='center'>
                                                            <c:if test="${var.status == 8}">已转交</c:if>
                                                            <c:if test="${var.status == 9}">已关闭</c:if>
                                                        </td>
                                                        <td class='center'  >
                                                            <c:if test="${var.level == 1}"><span class="square status-low"></span></c:if>
                                                            <c:if test="${var.level == 2}"><span class="square status-middle"></span></c:if>
                                                            <c:if test="${var.level == 3}"><span class="square status-high"></span></c:if>
                                                        </td>
                                                        <td class='center'><fmt:formatDate value="${var.startTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                                    </tr>
                                                </c:forEach>
                                            </table>
                                        </div>
                                    </li>
                                </c:forEach>
                            </ul>
                            </c:when>

希望我的分享对遇到同样困难的同学有所帮助!!!!

猜你喜欢

转载自blog.csdn.net/weixin_42225165/article/details/88943803
今日推荐