|
From: Chris W. <cwi...@op...> - 2004-03-05 16:18:29
|
Alef Arendsen wrote: > It's not possible to do this via a static on the BeanWrapper. It IS pos= sible > however... >=20 > J=FCrgen added a CustomEditorConfigurer that you can use to do this. Ju= st add > it to you app context and you're done. >=20 > <!-- taken from JavaDOC --> > <bean id=3D"customEditorConfigurer" > ... Excellent! That should work just fine. > If you're programmatically using the BeanFactory, you can add > propertyeditors using registerCustomEditor from the BeanFactory (or use= a > BeanFactoryPostProcessor). This is what I started doing, but if I instantiate a=20 BeanWrapperImpl myself the editors aren't available. (I'm just=20 using the BeanWrapper as a shortcut to do some property mapping=20 because it's so darned convenient.) Plus I'm not sure how to do this from an ApplicationContext vs. a=20 BeanFactory -- the registerCustomEditor() seems to be implemented=20 in AbstractBeanFactory which doesn't seem to be a parent of any=20 ApplicationContext class. (I'm a little hazy on the relationships=20 among the objects at this level tho.) Thanks! Chris --=20 Chris Winters (cwi...@op...) Senior Software Architect |