SPR-3389 Nicer handling of Java 5 enums by the Spring MVC form taglib.

The form:options and form:radiobuttons tags will now render a set of options automatically if the bind target is an Enum and items are not otherwise specified.  The values of the enum are converted into form inputs where by default the form value is the enum's name() and the form label is the enum's toString().
This commit is contained in:
Scott Andrews
2009-01-22 20:36:36 +00:00
parent ad2cc34b79
commit 8e261e5833
7 changed files with 219 additions and 19 deletions

View File

@@ -971,9 +971,9 @@
</attribute>
<attribute>
<name>items</name>
<required>true</required>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>The Collection, Map or array of objects used to generate the inner 'option' tags</description>
<description>The Collection, Map or array of objects used to generate the inner 'option' tags. This attribute is required unless the containing select's property for data binding is an Enum, in which case the enum's values are used.</description>
</attribute>
<attribute>
<name>itemValue</name>
@@ -1433,9 +1433,9 @@
<!-- radiobuttons specific attributes -->
<attribute>
<name>items</name>
<required>true</required>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description>The Collection, Map or array of objects used to generate the 'input' tags with type 'radio'</description>
<description>The Collection, Map or array of objects used to generate the 'input' tags with type 'radio'. This attribute is required unless the property for data binding is an Enum, in which case the enum's values are used.</description>
</attribute>
<attribute>
<name>itemValue</name>