title: Thymeleaf Table issues with rowspan (1 Order, N Articles)
body: <p>I'm making a simple intranet web view for a ordering system to show all orders that are currently processed. However I'm stuck with the thymeleaf markup: </p>
  
  <pre><code>public class Order {
    private Factory factory;
  
    private String orderNumber;
  
    private Date orderDate;
  
    ....
  
    private List&lt;Article&gt; articles;
  }
  
  public class Article {
  
    private String number;
  
    private String name;
  }
  </code></pre>
  
  <p>What i want to accomplish is the following (with 1 order + 3 articles in that order): </p>
  
  <pre><code>&lt;table class="table table-striped table-hover table-middle table-condensed table-bordered"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;OrderNr&lt;/th&gt;
        &lt;th&gt;Date&lt;/th&gt;
        &lt;th&gt;Article Number&lt;/th&gt;
        &lt;th&gt;ArticleName&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td rowspan="3"&gt;Order 32&lt;/td&gt;
        &lt;td rowspan="3"&gt;27.03.2020&lt;/td&gt;
        &lt;td&gt;17442&lt;/td&gt;
        &lt;td&gt;Screws&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;023423&lt;/td&gt;
        &lt;td&gt;Potatoe&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;32342&lt;/td&gt;
        &lt;td&gt;YetAnotherItem&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>all the common stuff should be row-spanned over all articles and the articles should be viewed one each line. However i have no idea on how to accomplish that with two th:each (one for the order, one for the articles of the order). I could "flatten" out my view (each line represented by one Line-Object) with a ton of ifs in the markup but that is a very dirty hack-around in my opinion...</p>
  
  <p>Can anyone help me out with a better solution?</p>
  
  <p>Thanks a lot!</p>