How to create a dynamic table by using JSTL ?
Below example is to display only 10 items in a table row and then it will create new row dynamically to display items in dynamic columns.
<table>
<tr>
<c:forEach items='${model.items}' var='item'
varStatus='counter' begin="0">
<c:if test="${counter.index % 10 == 0}">
</tr><tr>
</c:if>
<td>${item}</td>
</c:forEach>
</tr>
</table>
No comments:
Post a Comment