Spring Boot thymeleafで 研究開発中です。
テーブル内にリストボックスを設けているのですが、
DBから取得した結果をリストボックス選択した状態で表示したいのですがうまくいきません。
以下ロジックは、テーブルにDBより取得した、ソフトコード、ソフト名称を表示
ソフトコードのリストボックスを設けた状態です。
リストボックスにソフトコードを選択された状態で表示する方法を教えて下さい。
<table id="softListTable"> <thead> <tr class="text-center"> <th class="text-center">ソフトコード</th> <th class="text-center">リストボックス</th> <th class="text-center">ソフト名称</th> </tr> </thead> <tbody> <tr style="font-size: small;" th:each="soft : ${form.softList}"> <td class="text-center" th:text="${soft.softCd}"></td> <td> <select th:field="${form.softCd}"> <option th:each="item : ${form.softCdMapList}" th:value="${item.key}" th:text="${item.value}"></option> </select> </td> <td th:text="${soft.softName}"></td> </tr> </tbody> </table>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/07/15 05:58