앱)jstl list search result table sample 예제

Posted by HULIA(휴리아)
2018. 6. 12. 15:49 백엔드개발/자바스프링
<table class="table_tp1">
            <caption class="hide-caption">list</caption>
            <colgroup>
                     <col width="15%">
                     <col width="15%">
                     <col width="15%">
                     <col width="*">
           </colgroup>
           <thead>
                   <tr>
                          <th scope="col"><span>AAAA</span></th>
                          <th scope="col"><span>AAAA</span></th>
                          <th scope="col"><span>AAAA</span></th>
                          <th scope="col"><span>AAAA</span></th>
                 </tr>
             </thead>
             <tbody>
                   <c:choose>
                        <c:when test="${null != list && !empty list}">
                                 <c:forEach var="list" items="${list}" varStatus="lineIndex">
                       <tr<c:if test="${lineIndex.count % 2 == 0}">class="line_c"</c:if>>
                              <td class="al_c2">${list.kkk}</td>
                                <td class="al_c"><a href="#" onclick="detail('${list.kkk}')">kkkk</a></td>
                                 <td class="al_c">${list.kkk}</td>
                                 <td class="al_c">${list.kkk}</td>
                       </tr>
                                 </c:forEach>
                        </c:when>
                        <c:otherwise>
                              <tr>
                                     <td colspan="4" class="al_c2">No results were found for your search.</td>
                              </tr>
                         </c:otherwise>
                   </c:choose>
            </tbody>
        </table>