0

我是一名新的 Thymeleaf 开发人员(Spring-Boot 2.1.5 环境)。我想对来自输入的列表进行过滤。当我在输入中输入客户的名称时,它会出现在表格上(没有提交按钮)。

<form th:action="@{/clientslistbypage}" method="get" th:object="${Clients}" class="form-inline"  >
<input type="text" name="client" th:value="${client}"  id="clientSearch"     >
<!-- <input type="submit" name="clients" th:value="Search">-->
</form>

我尝试了 Projection and Collection 函数,但我不知道如何将输入值动态分配给 Collection 公式。(${Clients.?[firstName >='这里我想插入 Searche Input']})

<tr th:each = "c: ${Clients.?[firstName >='']}"  >
<td  th:text = "${c.id}"></td>
<td  th:text = "${c.firstName}"></td>
<td  th:text = "${c.LAST_NAME} "></td>
</tr>

我试过 DANDELION 但不幸的是,不要在 Spring-Boot 2.1.5 下运行。

欢迎任何建议、教程或示例

4

0 回答 0