thymeleaf標籤

# 表明 獲取對象 從 messages bundle 也就是消息的資源本地化文件 post

$ 表示從model裏面獲取 spa

# $這2個能夠一塊兒用 好比#{'system.'+${model.id}}  -----這至關於 #{system.01}的資源本地化文件中的system.01內容 code

下面介紹經常使用的標籤 orm

th:fragment=「public」 至關於 include標籤 對象

th:each="user : ${users}" 至關於c:foreach  使用時候ci

th:text="${user.id}" 這是表明着運行時候動態設置標籤爲用戶的id屬性的值資源

<form action="#" th:action="@{/users/add}" th:object="${myuser}" method="post"> rem

這裏th:Object表示表單與 改myuser注入的實體映射, string

在表單 th:field="*{id} 則表示 該表單的值 與 myuser的id綁定  io

th:remove="all"  使用了該標籤 將在運行時候移除全部的元素
<tr th:remove="all"> </tr>

常常有由td 表格展現某一行要判斷的狀況

1
< td class = "status" th:if = "${#strings.isEmpty(status)}" th:text = "這狀態爲空" >這裏顯示狀態不爲空</ td >
相關文章
相關標籤/搜索