【问题标题】:How to set Thymeleaf value in combo box?如何在组合框中设置 Thymeleaf 值?
【发布时间】:2018-03-25 04:33:37
【问题描述】:

我的问题是获取数据失败。

车辆名称未显示在 UI 上,但数据已显示在控制台中。我该如何解决这个问题?

Vehicle Type:
<select name="example">
  <option value="NONE">...Choose...</option>
  <option th:each="type : ${datalist}" th:value="${type.getName()}"></option>
</select><br/>

【问题讨论】:

    标签: spring-boot thymeleaf


    【解决方案1】:

    添加th:text="${type.getName()}"你的选项属性

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-29
      • 1970-01-01
      • 1970-01-01
      • 2017-10-03
      • 1970-01-01
      • 2012-07-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多