|
From: Guillaume P. <gpo...@gl...> - 2004-03-05 15:51:48
|
As far as I know=2C there=27s no real way of doing it within Spring=2E H= owever=2C java=2Ebeans do offer something that might works for you=2E Bu= t the method signature you used as example would not work correctly=2C as= PropertyEditors are not tread safe=2C which mean would could only either= register the class (if it has a default constructor) or register a facto= ry=2E Using java=2Ebeans=2C you can have define a PropertyEditor in two ways th= at I know of=2E One is to use PropertyEditorManager=2EregisterEditor(Cla= ss targetType=2C Class editorClass)=2E The other way is with class name = pattern=2E In the same way as for BeanInfo=2C if you have a class named = com=2Ecompany=2EBean=2C the PropertyEditorManager will use the editor nam= ed com=2Ecompany=2EBeanEditor if the class exists=2E I hope this helps=2C Guillaume ---- Messages d=B4origine ---- De=3A Chris Winters =3Ccwinters=40optiron=2Ecom=3E Date=3A vendredi=2C mars 5=2C 2004 10=3A16 am Objet=3A =5BSpringframework-developer=5D =22permanantly=22 registering pr= operty editor with BeanWrapper=3F =3E Is there a way to permanantly (for the life of the current JVM = =3E instance) register a property editor for the BeanWrapper = =3E (BeanWrapperImpl) to use=3F I see it maintains a static map of = =3E =27defaultEditors=27 but it looks like custom editors have to be = =3E registered with each wrapper instance=2E =3E = =3E Would it be possible to add a=3A =3E = =3E static void registerCustomerEditor( Class c=2C PropertyEditor e ) =3E = =3E or something similar that adds a custom editor to the default (or = =3E global) editors=3F =3E = =3E Thanks=2C =3E = =3E Chris =3E = =3E -- = =3E Chris Winters (cwinters=40optiron=2Ecom) =3E Senior Software Architect =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=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 Springframework-developer mailing list =3E Springframework-developer=40lists=2Esourceforge=2Enet =3E https=3A//lists=2Esourceforge=2Enet/lists/listinfo/springframework-de= veloper =3E |