I have a list of objects that I pass to a frontend JSP page. I need to display each value in its own div.
For example:
<div class="objects">
<div class="object"></div>
<div class="object"></div>
<div class="object"></div>
<div class="object"></div>
...
</div>
Is there any way to do it this way as opposed to putting it in a table and doing <td>
?
The list of Posts data can be printed as below in div
<div th:each="tempPost:${posts}">
<div th:text="${tempPost.getContent()}"></div>
<div th:text="${tempPost.getAuthor()}"></div>
<div th:text="${tempPost.getCreatedAt()}"></div>
</div>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.