【发布时间】:2016-11-30 14:10:25
【问题描述】:
使用@Crafalo 建议编辑
<form action="#" th:action="@{/admin/dict/adder}" th:object="${dictionary}" method="post">
<table>
<tr>
<td>Typ slownika:</td>
<td>
<select class="form-control" th:field="*{dict}" id="dropType">
<option value="0" th:text="select operator" ></option>
<option th:each="dict : ${dictList}" th:value="${dict.id}"
th:text="${dict.description}">Cos</option>
</select>
</td>
</tr>
控制器
List<Dictionary> dictList = dictService.findAllDictionaries();
model.addAttribute("dictionary", new Dictionary());
model.addAttribute("dictList", dictList);
Neither BindingResult nor plain target object for bean name 'dict' available as request attribute
在选择/选项中,我希望有一个这种形式的 parnet 字典,我需要创建一个子字典
【问题讨论】:
标签: spring spring-mvc thymeleaf