I am trying to use <f:convertNumber> to format a number that in in a column on a data table, but the formating appears to be ignored. I am using <f:convertNumber> in other places, but not in a <h:dataTable>, successfully.

Below is a portion of the <h:dataTable>.

<h:dataTable id="data" value="#{resultData}" var="rowVar" border="1"
             style="empty-cells: show;">
  <h:column>
    <f:facet name="header">
      <h:outputText value="Date" />
    </f:facet>
    <h:outputText value="#{rowVar.date}">
      <f:convertDateTime type="date" />
    </h:outputText>
  </h:column>
  <h:column>
    <f:facet name="header">
      <h:outputText value="Target Value" />
    </f:facet>
    <h:outputText value="#{rowVar.targetValue}">
      <f:convertNumber type="number" groupingUsed="false"
                       minIntegerDigits="1"
                       maxFractionDigits="#{rowVar.numberOfDecimals}"
                       minFractionDigits="#{rowVar.numberOfDecimals}" />
      </h:outputText>
      <h:outputText value="#{rowVar.numberOfDecimals}" />
   </h:column>
</h:dataTable>


Ideas?

Paul Spencer

Reply via email to