Reputation:
I'd like to put a linebreak in a tooltip so that it displays like:
Nom: value1
Quality: value2
I tried:
1.
<h:outputText title="Nom: #{cntc.value1}<br/>Quality: #{cntc.value1}" />
2.
<h:outputText title="Nom: #{ (''.concat(cntc.value1).concat('<br/>')concat('Quality: ').concat(cntc.value2)}" />
None of them worked for me. It seems that the <br/>
isn't being interpreted.
How can I achieve this?
Upvotes: 3
Views: 3058
Reputation: 3884
It's not a good idea to name the problem "Concatenating strings in EL" if your issue is with neither of those things. You want to create a multi-line title, that's an HTML problem.
Title only accepts text so <br/>
will not work but you can put a line break (
) in there:
<h:outputText value="#{cntc.mail }" title="Nom: #{cntc.nom} Qualite: #{cntc.qualite}" />
Note that this may not work in every browser.
Upvotes: 4