Hi

This won't work - If a user enters say "1,2" in the html:text field on
the form, then what happens is that once you call
BeanUtils.copyProperties - in the process converting it from String to
Double - the converted value becomes 0d. If the user enters "1.2" the
conversion is Ok.

So - Why is the Struts html:text tag not working along with the locale
as it should do ?

Hermod

-----Opprinnelig melding-----
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sendt: 19. mai 2004 13:42
Til: [EMAIL PROTECTED]
Emne: SV: Problem with number formatting


Hi

I'll give it a try. I just thought  that there might be someway of
setting the formatting of html:text globally.

Hermod

-----Opprinnelig melding-----
Fra: Mark Lowe [mailto:[EMAIL PROTECTED]
Sendt: 19. mai 2004 13:39
Til: Struts Users Mailing List
Emne: Re: Problem with number formatting


You could try something like

<fmt:formatNumber var="myno" value="1.2" />
<html:text property="someno" value="${myno}" />


On 19 May 2004, at 13:12, [EMAIL PROTECTED] wrote:

> Hi
>
> I see a kind of strange behaviour with the Struts html tags. When on a
> form I have a html:text field which displays a number, say 1.2 it
> displays as "1.2", but according to the locale I am using it should
> display as "1,2". On the same form I have a JSTL tag fmt:number, and
it
> displays it as it should i.e "1,2". Does anybody have know how to get
> these two to display the same format?
>
> Hermod
>
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * *
>
> This email with attachments is solely for the use of the individual or
> entity to whom it is addressed. Please also be aware that DnB NOR 
> cannot
> accept any payment orders or other legally binding correspondence with
> customers as a part of an email.
>
> This email message has been virus checked by the virus programs used
> in the DnB NOR Group.
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
> * * *
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to