我正在传递包含 Integer 和列表的 Map从我的控制器类中查看。内部视图我有选择选项,我只想在选项中显示列表值,但我不知道如何实现这一点。请帮我做这件事。
控制器
Map<Integer, List<String>> deviceidsAndwhatToUpdateText = new HashedMap<Integer, List<String>>();
Run Code Online (Sandbox Code Playgroud)
看法
<select class="form-control select-checkbox"
id="WhatToUpdate" multiple="multiple">
<option th:each="idsAndText : ${deviceidsAndwhatToUpdateText}"
th:value="${idsAndText.value}"
th:utext="${idsAndText.value}">Wireframe</option>
</select>
Run Code Online (Sandbox Code Playgroud)