teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

追記

2021/11/14 05:17

投稿

tyai
tyai

スコア5

title CHANGED
File without changes
body CHANGED
@@ -74,6 +74,26 @@
74
74
  }
75
75
  ```
76
76
 
77
+ ### 試してみたこと
78
+ newしないパターンも試しましたが同じエラーでした。
79
+ ```Java
80
+ @GetMapping
81
+ public String setting(Model model) {
82
+ List<WorksEntity> lstWorksEntity = worksService.worksFindAll();
83
+ model.addAttribute("lstWorksEntity", lstWorksEntity);
84
+ return "setting";
85
+ }
86
+
87
+ @PutMapping
88
+ public String displayWorks(List<WorksEntity> lstWorksEntity, SettingEntity settingEntity, Model model)
89
+ throws IOException {
90
+ List<String> checks = settingEntity.getChecks();
91
+ model.addAttribute("checks", checks);
92
+ worksService.worksUpdate(lstWorksEntity, checks);
93
+ return "redirect:/MyPortfolio/setting_page";
94
+ }
95
+ ```
96
+
77
97
  ### 補足情報(FW/ツールのバージョンなど)
78
98
 
79
99
  thymeleaf

1

誤記

2021/11/14 05:17

投稿

tyai
tyai

スコア5

title CHANGED
File without changes
body CHANGED
@@ -39,7 +39,7 @@
39
39
  <img th:src="'data:image/png;Base64,'+${lstWorks.stringImg}" class="thumbnail" alt="img" />
40
40
  <input class="disabled_checkbox" type="checkbox" name="checks" th:id="${lstWorks.id}"
41
41
  th:value="${lstWorks.id}" th:checked="${settingEntity.checks.contains(lstWorks.id)}" />
42
-
42
+ <label th:for="${lstWorks.id}" class="checkbox"></label>
43
43
  </div>
44
44
  </li>
45
45
  </ul>