« Return to Thread: How to format text in the title attribute of ?

RE: How to format text in the title attribute of <t:outputText>?

by Stephen Friedrich-4 :: Rate this Message:

Reply to Author | View in Thread

Create a getter in the backing bean that does the formatting (using java.text.DecimalFormat)?
If you don't want to change the backing bean, then create an EL function that does the formatting.


I am including a Double in the title of <t:outputText>.  The problem the
  default formating is undesired.
The tag:
  <t:outputText
     value="#{tripSummary.columnValue.idleSeconds.sum}"
     title="Mean idle time is
#{tripSummary.columnValue.idleSeconds.mean} minutes">
   <f:convertNumber maxFractionDigits="0" />
  </t:outputText>

Displays "Mean idle time is 6.977777777777777 minutes"  as tool tip.

I prefer "Mean idle time is 7 minutes".  The question is how can I
format the text?

Paul Spencer

 « Return to Thread: How to format text in the title attribute of ?

LightInTheBox - Buy quality products at wholesale price