سؤال

Is there any way to automate process of rendering tables with Spring MVC? I'm looking for some mechanism for automated rendering List of POJO's on JSP instead of manual writing code like this:

<c:if test="${not empty objects}">
    <table>
        <c:forEach var="o" items="${objects}">
            <tr>
                <td>${o.id}</td>
                <td>${o.name}</td>
            </tr>
        </c:forEach>
    </table>
</c:if>

Probably something like this:

<awesometaglib:smarttable data="${listOfPOJOs}"/>
هل كانت مفيدة؟

المحلول

You can try DisplayTag or any other library.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top