I just noticed a change in SpringMVC binding (works in 1.0.2, does not work in 1.1 RC1+):
My command object has a map of Parameter objects. The Parameter class has property with a method signatures like this:
I am registering a custom property editor for each Parameter instance in the map. For example:Code:Object getValue() void setValue(Object value)
In 1.0.2 this works fine--the value entered by the user is converted to an instance of Date and is bound to the value property of parameter. However, in 1.1 RC1 this does not work--a String containing the value entered by the user is bound to the value property of the parameter (not a Date). It looks like the registered property editor is bypassed and the user-submitted value is assigned directly to the "value" property. Maybe this has something to do with the fact that both String and Date are subclasses of Object.Code:String paramName = "parameterMap[start_date].value"; binder.registerCustomEditor(Date.class, paramName, getDateEditor());
Note, the version of Spring I am using was checked out of CVS and compiled on 8/12/2004, hence the "+" on 1.1 RC1+.[/code]


Reply With Quote