all data is required to be trimmed before going database. i currently use hibernate with JSF.
where would you put this logic in? in hibernate entity bean,or JSF backing beans?
what’s pros and cons. is there any other suggestion?
all data is required to be trimmed before going database. i currently use hibernate
Share
Do it in the view side. You can just create a JSF
ConverterforString.class.Or when you’re still on JSF 1.2, get rid of
@FacesConverterand register it as follows in yourfaces-config.xml.Either way, it’ll be applied on all input properties of the
Stringtype without the need to change anything else.This is not possible on JSF 1.1 or older due to the internal design.