小编moh*_*hit的帖子

地图上百里香叶中选择选项中的嵌套循环?

我正在传递包含 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)

spring-mvc thymeleaf spring-boot

2
推荐指数
1
解决办法
686
查看次数

标签 统计

spring-boot ×1

spring-mvc ×1

thymeleaf ×1