You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mark Struberg (JIRA)" <de...@myfaces.apache.org> on 2011/02/05 15:11:30 UTC

[jira] Created: (MYFACES-3029) DoubleConverter isn't Locale aware

DoubleConverter isn't Locale aware
----------------------------------

                 Key: MYFACES-3029
                 URL: https://issues.apache.org/jira/browse/MYFACES-3029
             Project: MyFaces Core
          Issue Type: Bug
            Reporter: Mark Struberg


Our DoubleConverter currently always use Double.valueOf() but this just takes the default Locale of the server we run at.

But the String representing the double might be different depending on the Users Locale.
E.g. in Germany, a double of 47.33 will be written as "47,33", whereas in the US, the decimal separator will be a dot: "47.33"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MYFACES-3029) DoubleConverter isn't Locale aware

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated MYFACES-3029:
-----------------------------------

    Status: Patch Available  (was: Open)

> DoubleConverter isn't Locale aware
> ----------------------------------
>
>                 Key: MYFACES-3029
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3029
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Mark Struberg
>
> Our DoubleConverter currently always use Double.valueOf() but this just takes the default Locale of the server we run at.
> But the String representing the double might be different depending on the Users Locale.
> E.g. in Germany, a double of 47.33 will be written as "47,33", whereas in the US, the decimal separator will be a dot: "47.33"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MYFACES-3029) DoubleConverter isn't Locale aware

Posted by "Mark Struberg (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3029?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated MYFACES-3029:
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.4-SNAPSHOT
         Assignee: Mark Struberg
           Status: Resolved  (was: Patch Available)

fixed in DoubleConverter.java

> DoubleConverter isn't Locale aware
> ----------------------------------
>
>                 Key: MYFACES-3029
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3029
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 2.0.4-SNAPSHOT
>
>         Attachments: MYFACES-3029.patch
>
>
> Our DoubleConverter currently always use Double.valueOf() but this just takes the default Locale of the server we run at.
> But the String representing the double might be different depending on the Users Locale.
> E.g. in Germany, a double of 47.33 will be written as "47,33", whereas in the US, the decimal separator will be a dot: "47.33"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MYFACES-3029) DoubleConverter isn't Locale aware

Posted by "Werner Punz (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12990992#comment-12990992 ] 

Werner Punz commented on MYFACES-3029:
--------------------------------------

Spec: Section 2.5.2.1
JSF has the concept of an active Locale which is used to look up all localized resources. Converters must use this
Locale when performing their conversion. This Locale is stored as the value of the locale JavaBeans property on
the UIViewRoot of the current FacesContext. The application developer can tell JSF what locales the application
supports in the applications’ WEB-INF/faces-config.xml file. For example:

So it really is a bug

> DoubleConverter isn't Locale aware
> ----------------------------------
>
>                 Key: MYFACES-3029
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3029
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Mark Struberg
>         Attachments: MYFACES-3029.patch
>
>
> Our DoubleConverter currently always use Double.valueOf() but this just takes the default Locale of the server we run at.
> But the String representing the double might be different depending on the Users Locale.
> E.g. in Germany, a double of 47.33 will be written as "47,33", whereas in the US, the decimal separator will be a dot: "47.33"

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira