You could use a Converter to automatically transform the input; see the Java EE 6 tutorial for more.
@FacesConverter("lowerConverter")
public class LowerConverter implements Converter {
@Override
public Object getAsObject(FacesContext cx, UIComponent component,
String value) throws ConverterException {
if(value == null) {
return null;
}
Locale locale = cx.getExternalContext().getRequestLocale();
return value.toLowerCase(locale);
}
@Override
public String getAsString(FacesContext cx, UIComponent component,
Object value) throws ConverterException {
if(value == null) {
return null;
}
return value.toString();
}
}