Truncate long text in dropdown jsf h: selectOneMenu
2 answers
You can create a utility function that will be used to truncate long text. Example:
function shortText(String data,int length){
return data.subString(0,length);
}
Now, instead of directly displaying the value, pass the value and length to this function and use the return value in the UI.
+1
source to share