My Enum:
Code:
public class enum MyEnum {
ABC("XYZ"),
DEF ("KW");
private String description;
public MyEnum(description) { this.description = description;}
public String getDescription() { return description;}
}
Command:
Code:
public class Command {
private MyEnum myPath;
// getters and setters
}
Controller.referenceData():
Code:
map.put("enums", MyEnum.values());
JSP:
Code:
<c:forEach var="enum" items="${enums}">
<form:radiobutton path="myPath" value="${enum}"/>${enum.description}
</c:forEach>
Generated HTML:
Code:
<input type="radio" name="myPath" value="ABC">XYZ
<input type="radio" name="myPath" value="DEF">KW
You do NOT need register a Custom Editor ! The conversion occurs automagically

When you post the form, the spring will look for a enum with the name of "myPath" parameter value and configure the object in the command.