Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from igakilab/sample4-4
sample4-4
- Loading branch information
Showing
4 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html xmlns:th="http://www.thymeleaf.org"> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title>Fruits</title> | ||
</head> | ||
|
||
<body> | ||
<h1>Hello Fruits</h1> | ||
<!--親となるタグでobject名を宣言すると,そのオブジェクト内のフィールドを子となるタグでは下記フォーマットで参照できるようになる--> | ||
<!-- この場合,fruitsからfruit1つを取り出し,それをth:objectで指定している--> | ||
<!--statはステータス変数--> | ||
<div th:each="fruit,stat : ${fruits}" th:object="${fruit}"> | ||
<tr> | ||
<td th:text="'index:' + ${stat.index}"></td> | ||
<td th:text="'id:'+ *{id}"></td> | ||
<td th:text="*{name}"></td> | ||
<td th:text="*{num}"></td> | ||
<td th:text="*{weight}"></td> | ||
<td th:text="*{details}"></td> | ||
<td th:text="*{sent}"></td> | ||
</tr> | ||
</div> | ||
</body> | ||
|
||
</html> |