반응형
<c:forEach var="bookingVO" items="${bookingVOList }" varStatus="status">
<ul class="tb-bd">
<li>
<div class="no">${bookingVO.seq}</div>
<div class="subject"><c:out value="${bookingVO.location}" /></div>
<div class="state">
<c:choose>
<c:when test="${bookingVO.status == '1'}" >
<span class="color01">승인</span>
</c:when>
<c:when test="${bookingVO.status == '2'}" >
<span class="color02">대기</span>
</c:when>
<c:when test="${bookingVO.status == '3'}" >
<span class="color03">취소</span>
</c:when>
<c:when test="${bookingVO.status == '4'}" >
<span class="color04">반려</span>
</c:when>
</c:choose>
</div>
<div class="name"><c:out value="${bookingVO.status}" /></div>
<div class="booking_date"><c:out value="${bookingVO.booking_date}" /></div>
<div class="date"><c:out value="${bookingVO.date}" /></div>
</li>
</ul>
</c:forEach>
<c:forEach var="변수명" items="${리스트가 받아올 배열이름}" varStatus="상태용 변수">
<c:forEach var="bookingVO" items="${bookingVOList }" varStatus="status">
<div class="no">${bookingVO.seq}</div>
</c:forEach>
varStatus="상태용 변수" ${status.current} 현재 for문의 해당하는 번호 ${status.index} 0부터의 순서 ${status.count} 1부터의 순서 ${status.first} 첫 번째인지 여부 ${status.last} 마지막인지 여부 ${status.begin} for문의 시작 번호 ${status.end} for문의 끝 번호 ${status.step} for문의 증가값 |
반응형
'SPRING' 카테고리의 다른 글
[스프링 부트] int 값 받아오는 법 (0) | 2021.06.19 |
---|---|
[스프링] c:choose로 상태에 따른 값 출력하는 법 (0) | 2021.06.11 |
[오류 해결] The import org.springframework.test cannot be resolved (0) | 2021.05.30 |
[SPRING BOOT/스프링 부트] MyBatis 파라미터 사용할 때 Dao (0) | 2021.05.30 |
[SPRING BOOT] 스프링 부트 MVC 패턴 주절주절 아무렇게 공부 (0) | 2021.05.29 |