Spring MVC 标签之radiobuttons

xiaoxiao2021-02-28  77

<form:radiobuttons path="defaultGroup" items="${booleanList}" itemLabel="info" itemValue="value"/>

传入一个Array、List,或者Map,并把可用选项包含在“items”属性中。在使用Map的情况下,map条目的键被用作值, map条目的值被用作显示的文本标记。也可以使用一个定制的对象,提供“itemValue”属性存放值,“itemLabel”属性存放文本标记。

如果是List/Array , itemLabel 和 itemValue 的值均对应其中对象的方法

转载请注明原文地址: https://www.6miu.com/read-63161.html

最新回复(0)