質問編集履歴
1
内容変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Spring 拡張for文th:each属性
|
1
|
+
Spring 拡張for文th:each属性の表示がうまくいかない
|
test
CHANGED
@@ -1,116 +1,72 @@
|
|
1
|
-
Spring Bootで下記のコードを書くと、横一列で表示されますが、
|
1
|
+
Spring Bootで下記のコードを書くと、横一列で表示されますが、![イメージ説明](8726d16361588085fdb1ff2523fd690b.png)
|
2
|
-
|
3
|
-
それを、テーブルのように表示は可能でしょうか?
|
4
|
-
|
5
|
-
試してみましたが、エラーになってしまいます。
|
6
2
|
|
7
3
|
|
8
4
|
|
9
5
|
|
10
6
|
|
11
|
-
|
7
|
+
|
12
8
|
|
13
9
|
```
|
14
10
|
|
15
|
-
<t
|
11
|
+
<!DOCTYPE html>
|
16
12
|
|
17
|
-
|
13
|
+
<html xmlns:th="http://www.thymeleaf.org">
|
18
14
|
|
19
|
-
|
15
|
+
<head>
|
20
16
|
|
21
|
-
|
17
|
+
<meta charset="UTF-8" />
|
22
18
|
|
23
|
-
|
19
|
+
|
24
20
|
|
25
|
-
|
21
|
+
<title>日誌登録</title>
|
26
22
|
|
27
|
-
|
23
|
+
</head>
|
28
24
|
|
29
|
-
|
25
|
+
<h1>日誌登録</h1>
|
30
26
|
|
31
|
-
|
27
|
+
|
32
28
|
|
33
|
-
|
29
|
+
</head>
|
34
30
|
|
35
|
-
|
31
|
+
<body>
|
36
32
|
|
37
|
-
|
33
|
+
<h1 class="text-center table table-hover ">日誌一覧</h1>
|
38
34
|
|
39
|
-
|
35
|
+
<table border="1" class="table table-striped ">
|
40
36
|
|
41
|
-
|
37
|
+
<tr>
|
42
38
|
|
43
|
-
<t
|
39
|
+
<th class="text-center">id</th>
|
44
40
|
|
45
|
-
<
|
41
|
+
<th class="text-center">園児番号</th>
|
46
42
|
|
47
|
-
<tr>
|
43
|
+
<th colspan="3" class="text-center">園児の名前</th>
|
48
44
|
|
49
|
-
<t
|
45
|
+
<th class="text-center">睡眠開始時間</th>
|
50
46
|
|
51
|
-
<t
|
47
|
+
<th class="text-center">睡眠終了時間</th>
|
52
48
|
|
53
|
-
<
|
49
|
+
<th class="text-center">機嫌</th>
|
54
50
|
|
55
|
-
<tr>
|
51
|
+
<th class="text-center">排便</th>
|
56
52
|
|
57
|
-
<t
|
53
|
+
<th class="text-center">食事</th>
|
58
54
|
|
59
|
-
<t
|
55
|
+
<th class="text-center">1日の様子</th>
|
60
56
|
|
61
|
-
<
|
57
|
+
<th class="text-center">お迎え時間</th>
|
62
58
|
|
63
|
-
<tr>
|
59
|
+
<th class="text-center">伝達事項</th>
|
64
60
|
|
65
|
-
<t
|
61
|
+
<th class="text-center">記入者</th>
|
66
62
|
|
67
|
-
<t
|
63
|
+
<th class="text-center">日付</th>
|
68
64
|
|
69
|
-
|
65
|
+
|
70
66
|
|
71
|
-
<tr>
|
67
|
+
</tr>
|
72
68
|
|
73
|
-
<td colspan="2"></td>
|
74
|
-
|
75
|
-
<td colspan="6"></td>
|
76
|
-
|
77
|
-
</tr>
|
78
|
-
|
79
|
-
<tr>
|
80
|
-
|
81
|
-
<td colspan="2"></td>
|
82
|
-
|
83
|
-
<td colspan="6"></td>
|
84
|
-
|
85
|
-
</tr>
|
86
|
-
|
87
|
-
<tr>
|
88
|
-
|
89
|
-
<td colspan="2"></td>
|
90
|
-
|
91
|
-
<td colspan="6"></td>
|
92
|
-
|
93
|
-
</tr>
|
94
|
-
|
95
|
-
<tr>
|
96
|
-
|
97
|
-
<td colspan="2"></td>
|
98
|
-
|
99
|
-
<td colspan="6"></td>
|
100
|
-
|
101
|
-
</tr>
|
102
|
-
|
103
|
-
</tbody>
|
104
|
-
|
105
|
-
</table>
|
106
|
-
|
107
|
-
```
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
```ここに言語を入力
|
112
|
-
|
113
|
-
<tr th:each="nissi: ${teacherNissilist
|
69
|
+
<tr th:each="nissi: ${teacherNissilist}">
|
114
70
|
|
115
71
|
<td th:text="${nissi.id}">
|
116
72
|
|
@@ -128,12 +84,46 @@
|
|
128
84
|
|
129
85
|
<td th:text="${nissi.meal}">
|
130
86
|
|
131
|
-
<td th:text="${nissi.phase}">
|
87
|
+
<td th:text="${nissi.phase}">
|
88
|
+
|
89
|
+
<td th:text="${nissi.pickuptime}">
|
132
90
|
|
133
91
|
<td th:text="${nissi.communication}">
|
134
92
|
|
135
93
|
<td th:text="${nissi.daybookwriter}">
|
136
94
|
|
137
|
-
<td th:text="${nissi.writedate}">
|
95
|
+
<td th:text="${nissi.writedate}">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
</td></tr></body>
|
102
|
+
|
103
|
+
<form th:action="@{/teacher-nissi-end}" th:object="${insertMogipuroForm}" >
|
104
|
+
|
105
|
+
<input type="submit" name="back_btn" value="日記登録" />
|
106
|
+
|
107
|
+
<input type="submit" name="nissi_btn" value="戻る" />
|
108
|
+
|
109
|
+
</form>
|
110
|
+
|
111
|
+
</html>
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
138
124
|
|
139
125
|
```
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
![イメージ説明](98206ed71d62e634708d9060befc4d0d.png)
|