diff --git a/spring-framework-reference/src/validation.xml b/spring-framework-reference/src/validation.xml index bd6633c4875..11c78f03bfa 100644 --- a/spring-framework-reference/src/validation.xml +++ b/spring-framework-reference/src/validation.xml @@ -636,18 +636,8 @@ package example; public class ExoticTypeEditor extends PropertyEditorSupport { - private String format; - - public void setFormat(String format) { - this.format = format; - } - public void setAsText(String text) { - if (format != null && format.equals("upperCase")) { - text = text.toUpperCase(); - } - ExoticType type = new ExoticType(text); - setValue(type); + setValue(new ExoticType(text.toUpperCase())); } }]]> Finally, we use CustomEditorConfigurer to register the new @@ -656,11 +646,7 @@ public class ExoticTypeEditor extends PropertyEditorSupport { - - - - - + ]]>