Hello all, the ability to do custom Object<->String conversion provided in the beta looks really useful, unfortunately I'm having some trouble getting it working...
Given a bean class, TestBean, with getLocale() and setLocale(Locale) methods I thought it would be sufficient to add beanWriter.getBindingConfiguration().setObjectStringConverter(new LocaleConverter()) before writing out the TestBean instance to get my LocaleConverter used. This doesn't seem to be the case. LocaleConverter.objectToString(..) is not called. However if I add getName() setName(String) to TestBean then LocaleConverter is called upon to convert the name (but still not the locale). (BTW: LocaleConverter has nothing to do with the one in beanutils.) Digging through the code it seems that I can hack XmlHelperUtils to change what types are considered as primitives so that an ElementDescriptor is not created and the converter is used instead. This seems a bit dodgy for Locale and _real_ dodgy for non java classes. Am I blind? Is there a better way? Thanks Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
