As @BalusC said you can use text-transform: capitalize;
. But it converts the first letter of each word in your sentence to uppercase. If your requirement is that, that is the best answer because
1. It is easier
2. text-transform: capitalize;
is supported by all major browsers.
However if you want to capitalize only the very first letter of the sentence you can do something like this.
public String getLabel() {
if(label != null && !label.isEmpty()) {
return Character.toUpperCase(label.charAt(0)) + label.substring(1);
}
return label;
}
I don't think that JBoss Seam has a <s:convertStringUtils>
tag. As I think such a tag is available in Apache MyFaces. Don't know much about that.