myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Bischoff <jbisch...@klkurz.com>
Subject Re: Problem with f:convertNumber
Date Tue, 14 Nov 2006 14:43:53 GMT
Adrian,

As I recall, this f:convertNumber tag was "broken" in order to ensure 
compatibility with the JSF spec. The old convertNumber implementation 
(which automatically converts numbers) was immediately moved to sandbox, 
where you can still use it. If you want to use BigDecimal, use 
s:convertNumber.

[1] http://www.nabble.com/convertNumber-tf1682686.html#a4647327

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Adrian Mitev wrote:
> Other suggestions? And btw why such problem occured?
> 
> 2006/11/14, Mario Ivankovits <mario@ops.co.at>:
>>
>> Hi Adrian!
>> > Hi all! I`m using myfaces 1.1.5 nightly build. I've created my own
>> > convertor for BigDecimal to show error message that is oriented to the
>> > big decimal object. I have form with input field that is binded to big
>> > decimal. Everything works fine. Now i want to put a convertor that
>> > will cut some fraction digits - <f:convertNumber maxFractionDigits="5"
>> > />. When the page is rendered everything is ok but when i submit the
>> > form i got the following as <h:message> for the input component:
>> > Exception setting property taxBase of base with class
>> > org.cts.web.bean.WareDTO, Bean: org.cts.web.bean.WareDTO, property:
>> > taxBase, newValue: 1,newValue class: java.lang.Long method parameter
>> > class: java.math.BigDecimal, argument type mismatch
>> > Or if i input decimal value - 1.5 i get ... newValue: 1.5,newValue
>> > class: java.lang.Double method parameter class: java.math.BigDecimal,
>> > argument type mismatch.
>> > Any suggestions?
>> Use the tomahawk sandbox (I think) converter s:convertNumber which will
>> automatically try to convert the input to the data type of your backing
>> bean.
>>
>> Ciao,
>> Mario
>>
>>
> 



Mime
View raw message