Volker,
Suggested workarounds?

Paul Spencer

Volker Weber wrote:
Hi Paul,

it is not possible to use the dataTables var object (here "rowVar") in
converters, because the evaluation of valueBinding in converter
attributes are done once at creation time, not at rendering time.
The "rowVar" object did not exist on component crateion time.


Regards,
  Volker




Paul Spencer wrote:

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