|
From: Guillaume P. <gpo...@gl...> - 2004-03-05 16:05:54
|
CustomEditorConfigurer only registers the PropertyEditors for the current= factory=2C not the whole JVM=2E ---- Messages d=B4origine ---- De=3A Alef Arendsen =3Calef=40jteam=2Enl=3E Date=3A vendredi=2C mars 5=2C 2004 10=3A37 am Objet=3A RE=3A =5BSpringframework-developer=5D =22permanantly=22 register= ing property editor with BeanWrapper=3F =3E It=27s not possible to do this via a static on the BeanWrapper=2E It = =3E IS possible =3E however=2E=2E=2E =3E = =3E J=FCrgen added a CustomEditorConfigurer that you can use to do this=2E= = =3E Just add =3E it to you app context and you=27re done=2E =3E = =3E =3C!-- taken from JavaDOC --=3E =3E =3Cbean id=3D=22customEditorConfigurer=22 =3E class=3D=22org=2Espringframework=2Ebeans=2Efactory=2Econfig=2ECustomE= ditorConfigurer=22=3E =3E =3Cproperty name=3D=22customEditors=22=3E =3E =3Cmap=3E =3E =3Centry key=3D=22java=2Eutil=2EDate=22=3E =3E =3Cbean class=3D=22mypackage=2EMyCustomDateEditor=22/=3E =3E =3C/entry=3E =3E =3Centry key=3D=22mypackage=2EMyObject=22=3E =3E =3Cbean id=3D=22myEditor=22 class=3D=22mypackage=2EMObjectEdit= or=22=3E =3E =3Cproperty name=3D=22myParam=22=3E=3Cvalue=3EmyValue=3C/val= ue=3E=3C/property=3E =3E =3C/bean=3E =3E =3C/entry=3E =3E =3C/map=3E =3E =3C/property=3E =3E =3C/bean=3E =3E = =3E If you=27re programmatically using the BeanFactory=2C you can add =3E propertyeditors using registerCustomEditor from the BeanFactory = =3E (or use a =3E BeanFactoryPostProcessor)=2E =3E = =3E Alef =3E = =3E = =3E =3E -----Original Message----- =3E =3E From=3A springframework-developer-admin=40lists=2Esourceforge=2En= et =3E =3E =5Bmailto=3Aspringframework-developer-admin=40lists=2Esourceforge= =2Enet=5D = =3E On Behalf =3E =3E Of Chris Winters =3E =3E Sent=3A Friday=2C March 05=2C 2004 4=3A17 PM =3E =3E To=3A Spring-Dev =3E =3E Subject=3A =5BSpringframework-developer=5D =22permanantly=22 regi= stering = =3E property=3E editor with BeanWrapper=3F =3E =3E = =3E =3E Is there a way to permanantly (for the life of the current JVM =3E =3E instance) register a property editor for the BeanWrapper =3E =3E (BeanWrapperImpl) to use=3F I see it maintains a static map of =3E =3E =27defaultEditors=27 but it looks like custom editors have to be =3E =3E registered with each wrapper instance=2E =3E =3E = =3E =3E Would it be possible to add a=3A =3E =3E = =3E =3E static void registerCustomerEditor( Class c=2C PropertyEditor = e ) =3E =3E = =3E =3E or something similar that adds a custom editor to the default (or= =3E =3E global) editors=3F =3E =3E = =3E =3E Thanks=2C =3E =3E = =3E =3E Chris =3E =3E = =3E =3E -- =3E =3E Chris Winters (cwinters=40optiron=2Ecom) =3E =3E Senior Software Architect =3E =3E = =3E =3E = =3E =3E ------------------------------------------------------- =3E =3E This SF=2ENet email is sponsored by=3A IBM Linux Tutorials =3E =3E Free Linux tutorial presented by Daniel Robbins=2C President and = =3E CEO of =3E =3E GenToo technologies=2E Learn everything from fundamentals to syst= em =3E =3E = =3E administration=2Ehttp=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid=3D1470=26alloc=5F= id=3D3638=26op=3Dclick=3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F =3E =3E Springframework-developer mailing list =3E =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframewor= k- =3E developer =3E = =3E = =3E ------------------------------------------------------- =3E This SF=2ENet email is sponsored by=3A IBM Linux Tutorials =3E Free Linux tutorial presented by Daniel Robbins=2C President and CEO = of =3E GenToo technologies=2E Learn everything from fundamentals to system =3E administration=2Ehttp=3A//ads=2Eosdn=2Ecom/=3Fad=5Fid=1470=26alloc=5F= id638=26op=D5ick =3E =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F =3E Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E |