Hello,
I've a bean with a Class<?> property. I want to display the simple
name, without success.
First it understands well that (T5.0.10) :
public static void
contributeDefaultDataTypeAnalyzer(MappedConfiguration<Class<?>, String>
configuration) {
configuration.add(Class.class, "text");
}
It display something like "class my.package.entity".
As I'm trying to contribute my own TypeCoercer, it looks like it is not
used :
public static void
contributeTypeCoercer(Configuration<CoercionTuple> configuration) {
Coercion<Class, String> coercionClassString = new
Coercion<Class, String>() {
public String coerce(Class input) {
if (input == null) {
return "";
}
// my code normally looksup an enum
return input.getSimpleName();
}
};
configuration.add(new CoercionTuple<Class, String>(Class.class,
String.class, coercionClassString));
}
Any idea? I've added a read only property for the moment, perhaps a best
way...
--
Gabriel <[EMAIL PROTECTED]>
http://www.codelutin.com
tel : 02 40 50 29 28 / fax : 09 59 92 29 28
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]