用thymeleaf用标签给页面select下拉框赋值怎么实现
1个回答
展开全部
th:field="*{paymentMethod}"paymentMethod象list象multiple select直接使用OK
paymentMethod,号隔字符串则能自处理thymeleaf没找整呢处理式:
<option th:each="category:${knowPointList}" th:value="${category.id}"
th:selected="${#strings.contains(instance.knowledgePointIdSet,category.id)}"
th:text="${category.name}" >模块名称
-
paymentMethod,号隔字符串则能自处理thymeleaf没找整呢处理式:
<option th:each="category:${knowPointList}" th:value="${category.id}"
th:selected="${#strings.contains(instance.knowledgePointIdSet,category.id)}"
th:text="${category.name}" >模块名称
-
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询