I have the list products. I want to create condition when this list is empty - just add plain text to my page, but if not - want to iterate over it and add like table. What I have for the moment is:
<span th:if="${#lists.isEmpty(projects)}" th:text="No projects for chosen category." th:remove="tag"/>
<span th:unless="${#lists.isEmpty(projects)}" th:utext="${<table><td>ID:</td><td>Example text</td></table>}" th:remove="tag"/>
The problem here is how can I conditionally add table to my page with iterating over it using Thymeleaf?