reset password
Author Message
cthanh
Posts: 56
Posted 18:54 Aug 09, 2015 |

Are Property Editors able to handle lists?

Are Property Editors more for "formatting" whereas Converters are for changing the type of the Object?

 

I was trying to understand the example you sent in your email sent July 26 but had difficulty how it worked or what I was looking for.

- ProfileControllerS in CSNS2 which uses a custom UserPropertyEditor for the coordinator property in Course.

 

Thanks

cysun
Posts: 2935
Posted 19:52 Aug 09, 2015 |

I'm not sure whether Property Editor can handle lists. Conceptually there's no reason why it cannot, but I suspect that when Spring sees an argument of List<SomeType> type, it will try to look for multiple request parameters with the same name. In the end, you probably never need a property editor for list as long as you have one for "SomeType".

The "ProfileControllerS" in the last bullet point in the email should be "CourseControllerS". Sorry about the mistake.