Create Table with two Lists in Thymeleaf

0

Hi, I'm new to Thymeleaf, I have two lists that I sent from my controller to a thymeleaf template, my question I can use those two lists and display them in a table.

List 1 has: id, name, key list 2 has: id, id_list1 and key

What I want to get is a table that shows:

name_list1 key_list1 key_list2

<div class="ac-content">
    <table class="aui" >
            <thead>
                <tr>
                    <th id="basic-number">#</th>
                    <th id="basic-fecha">Fecha</th>
                    <th id="basic-lname">Name</th>
                    <th id="basic-key">Key</th>
                    <th id="basic-keyI">Key Issue</th>
                </tr>
            </thead>
            <tbody>
                <tr th:if="${Lista_P.empty}">
                    <td colspan="2"> No hay Proyectos Disponibles </td>
                </tr>
                <th:block th:each="iss : ${Lista_I}"  th:if="iss.id_project == pro.id"  > 
                <tr th:each="pro : ${Lista_P}">   

                        <td headers="basic-number">#</td>
                        <td headers="basic-fecha"><span th:text="${fecha}"> Fecha </span></td>
                        <td headers="basic-lname"><span th:text="${pro.name}"> Name </span></td>
                        <td headers="basic-key"><span th:text="${pro.key}"> Key </span></td>
                        <td headers="basic-keyI"><span th:text="${iss.key}"> Key Issue </span></td>

                </tr>
                </th:block>
            </tbody>
        </table>            
 </div>
    
asked by alexandra_1123 21.10.2018 в 00:02
source

0 answers