Concatenating strings within EL expression defined in an attribute of a facelets tag
It is possible to concatenate Strings in EL using the java.lang.String.concat(String) method. Thus your code could look like: <h:outputText value=”#{cc.attrs.appreciatedByCurrentUser ? (”.concat(cc.attrs.count).concat(‘<br/>’).concat(cc.attrs.count-1)) : (”.concat((cc.attrs.count+1)).concat(‘<br/>’).concat(cc.attrs.count))}” escape=”false” /> In this particular case however I would go with one of the options that Mr BalusC had suggested because the code above doesn’t look quite elegant. In some cases … Read more