thymeleaf - how to make two cells in a table merge if one is null or empty?
<p>I have a table with 7 columns and I'd like to make two of them merge and display some nice information to the user if there's a null or empty value in a condition check.</p>

<p>I tried something like this, but it didn't work.</p>

<pre><code>&lt;tr th:each="pojo : ${pojoList}"&gt;
    &lt;td th:text="${pojo.a}"/&gt;
    &lt;td th:text="${pojo.b}"/&gt;
    &lt;td th:text="${pojo.c}"/&gt;
    &lt;td th:text="${pojo.d}"/&gt;
    &lt;td th:text="${pojo.e}"/&gt;

    // here I test if the value is null or empty, if so the next two columns should merge
    &lt;td th:if="${pojo.f.empty}" colspan="2" th:text="#{nice.info}"/&gt;

    // if value is not null or empty, the next two columns gets their respective values
    &lt;td th:text="${pojo.f}"/&gt;
    &lt;td th:text="${pojo.g}"/&gt;

    &lt;td&gt;
        &lt;a th:href="@{/url/edit(id=${pojo.id})}"&gt;
            &lt;img width="20px" height="20px" alt="edit" th:src="@{/assets/img/edit.png}" /&gt;
        &lt;/a&gt;
        &lt;a th:href="@{/url/remove(id=${pojo.id})}"&gt;
            &lt;img width="20px" height="20px" alt="remove" th:src="@{/assets/img/delete.png}" /&gt;
        &lt;/a&gt;
    &lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>What am I not seeing here?</p>