I have custom number converter like this:
@FacesConverter(value = "myConverter")
public class MyConverter implements Converter {
@Override
public Object getAsObject(FacesContext context, UIComponent component, String value) {
//get property type of back bean
return null;
}
@Override
public String getAsString(FacesContext context, UIComponent component, Object value) {
// do something
return null;
}
}
If I could get the type of the backbean's field, I would not have to create a converter for each subclass of Number
. Is there a way to achieve it?