myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volker Weber <users.myfa...@weber-oldenburg.de>
Subject Re: <f:convertNumber> seams to be ignored when in a <h:dataTable>
Date Tue, 25 Apr 2006 09:14:10 GMT
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
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Mime
View raw message