So habe ich die folgenden Ansichten:Gibt es eine Möglichkeit, Parameter an Thymeleaf zu übergeben?
<body>
<[email protected] id="repidTable" type="biz.tugay.RepidTypeTable"-->
<div th:include="repidTable"></div>
</body>
und repidTable.html ist wie folgt:
<[email protected] id="repidTypeColumns" type="java.util.List<biz.tugay.RepidTypeTableColumn>"-->
<[email protected] id="repidTypeRows" type="java.util.List<biz.tugay.RepidTypeTableRow>"-->
<table>
<thead>
<tr>
<th th:each="repidTypeColumn : ${repidTypeColumns}" th:text="${repidTypeColumn.columnHeaderText}">
</th>
</tr>
</thead>
<tr th:each="repidTypeRow : ${repidTypeRows}">
<td th:each="repidTypeCell : ${repidTypeRow.repidTypeTableCells}" th:text="${repidTypeCell.data}">
</td>
</tr>
</table>
die .. aber gut funktioniert, ich will repidTable zu Lage Pass Parameter sein.
Was ich brauche, ist, statt repidTable.html so etwas wie genericTable.html die zwei Parameter akzeptiert, und ich möchte repidTypeColumns und repidTypeRows während genericTable.html einschließlich passieren