You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Dennis Doubleday (JIRA)" <ji...@apache.org> on 2007/12/18 17:58:33 UTC

[jira] Commented: (WW-2349) localized conversion from number to string broken

    [ https://issues.apache.org/struts/browse/WW-2349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42830 ] 

Dennis Doubleday commented on WW-2349:
--------------------------------------

I'm not sure if this should be a separate bug or not, but I'd like to add the following information. There is also disparity between the treatment of properties that are of type Double and those that are primitive double. When your property is a primitive double, XWork doesn't even localize parsing. XWorkBasicConverter delegates the conversion up to DefaultTypeConverter, which just uses Double.parseDouble() to do the conversion.


> localized conversion from number to string broken
> -------------------------------------------------
>
>                 Key: WW-2349
>                 URL: https://issues.apache.org/struts/browse/WW-2349
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>            Reporter: Sebastian
>            Priority: Blocker
>
> Situation:
> Locale is set to de_DE.
> Action contains a property 
> private Double percentage;
> with getters/setters.  The corresponding page contains a "textfield" tag for this property. It only accepts a "," (comma) as a decimal separator due to the set locale.
> But when the Double property is preset to a certain value and the page rendered afterwards, the textfield is filled with a number using the "." (dot) as decimal separator, instead of comma. 
> In short: parsing of numbers is localized, formatting not. This is inconsistent.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.