You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Attila Király (JIRA)" <ji...@apache.org> on 2011/04/04 07:25:05 UTC

[jira] [Created] (WICKET-3591) NumberTextField and RangeTextField should always render/parse it's value with English locale

NumberTextField and RangeTextField should always render/parse it's value with English locale
--------------------------------------------------------------------------------------------

                 Key: WICKET-3591
                 URL: https://issues.apache.org/jira/browse/WICKET-3591
             Project: Wicket
          Issue Type: Bug
          Components: wicket-core
    Affects Versions: 1.5-RC3
         Environment: client with a locale where the decimal mark is not a period
            Reporter: Attila Király


Wicket started adding some support for the new Html5 input types. Among these are NumberTextField for number type [1] and RangeTextField for range type [2]. The Html5 spec mandates that the "value", "min", "max" attributes for these inputs are floating point numbers. Html5 spec also describes the format of a float number [3]. Simply to say it is a number formatted with English locale (for example: decimal mark is a period).

Wicket currently renders min and max spec compliant but renders the value wrong because it uses the client locale for that. Which means for example for a Hungarian client it will generate "3,14" instaed "3.14". This breaks the custom widgets used by browsers for these new inputs (Chrome and Opera have custom ui, FF and IE stil use plain text field) because they except the value with a period decimal mark. This means that browsers will post the value formatted in English locale too so parsing is also broken for these on the wicket server side because the client locale is used there also.

Imho wicket should always use the English locale for rendering/parsing these values in case of these input types.

To reproduce you can use the form examples from "wicket-html5-examples" in the wicketstuff project (I found this bug there).

[1] Html5 input number type: http://dev.w3.org/html5/markup/input.number.html
[2] Html5 input range type: http://dev.w3.org/html5/markup/input.range.html
[3] Html5 float datatype: http://dev.w3.org/html5/markup/datatypes.html#common.data.float

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

[jira] [Updated] (WICKET-3591) NumberTextField and RangeTextField should always render/parse its value with English locale

Posted by "Attila Király (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Király updated WICKET-3591:
----------------------------------

    Environment: client with a locale where the decimal mark is not a period (for example: Hungarian locale)  (was: client with a locale where the decimal mark is not a period)
        Summary: NumberTextField and RangeTextField should always render/parse its value with English locale  (was: NumberTextField and RangeTextField should always render/parse it's value with English locale)

> NumberTextField and RangeTextField should always render/parse its value with English locale
> -------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3591
>                 URL: https://issues.apache.org/jira/browse/WICKET-3591
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>         Environment: client with a locale where the decimal mark is not a period (for example: Hungarian locale)
>            Reporter: Attila Király
>
> Wicket started adding some support for the new Html5 input types. Among these are NumberTextField for number type [1] and RangeTextField for range type [2]. The Html5 spec mandates that the "value", "min", "max" attributes for these inputs are floating point numbers. Html5 spec also describes the format of a float number [3]. Simply to say it is a number formatted with English locale (for example: decimal mark is a period).
> Wicket currently renders min and max spec compliant but renders the value wrong because it uses the client locale for that. Which means for example for a Hungarian client it will generate "3,14" instaed "3.14". This breaks the custom widgets used by browsers for these new inputs (Chrome and Opera have custom ui, FF and IE stil use plain text field) because they except the value with a period decimal mark. This means that browsers will post the value formatted in English locale too so parsing is also broken for these on the wicket server side because the client locale is used there also.
> Imho wicket should always use the English locale for rendering/parsing these values in case of these input types.
> To reproduce you can use the form examples from "wicket-html5-examples" in the wicketstuff project (I found this bug there).
> [1] Html5 input number type: http://dev.w3.org/html5/markup/input.number.html
> [2] Html5 input range type: http://dev.w3.org/html5/markup/input.range.html
> [3] Html5 float datatype: http://dev.w3.org/html5/markup/datatypes.html#common.data.float

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

[jira] [Resolved] (WICKET-3591) NumberTextField and RangeTextField should always render/parse its value with English locale

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3591.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC4
         Assignee: Martin Grigorov

Fixed with r1090641.

> NumberTextField and RangeTextField should always render/parse its value with English locale
> -------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3591
>                 URL: https://issues.apache.org/jira/browse/WICKET-3591
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>         Environment: client with a locale where the decimal mark is not a period (for example: Hungarian locale)
>            Reporter: Attila Király
>            Assignee: Martin Grigorov
>             Fix For: 1.5-RC4
>
>         Attachments: fix-WICKET-3591.patch
>
>
> Wicket started adding some support for the new Html5 input types. Among these are NumberTextField for number type [1] and RangeTextField for range type [2]. The Html5 spec mandates that the "value", "min", "max" attributes for these inputs are floating point numbers. Html5 spec also describes the format of a float number [3]. Simply to say it is a number formatted with English locale (for example: decimal mark is a period).
> Wicket currently renders min and max spec compliant but renders the value wrong because it uses the client locale for that. Which means for example for a Hungarian client it will generate "3,14" instead "3.14". This breaks the custom widgets used by browsers for these new inputs (Chrome and Opera have custom ui, FF and IE stil use plain text field) because they expect the value with a period decimal mark. This means that browsers will post the value formatted in English locale too so parsing is also broken for these on the wicket server side because the client locale is used there also.
> Imho wicket should always use the English locale for rendering/parsing these values in case of these input types.
> To reproduce you can use the form examples from "wicket-html5-examples" in the wicketstuff project (I found this bug there).
> [1] Html5 input number type: http://dev.w3.org/html5/markup/input.number.html
> [2] Html5 input range type: http://dev.w3.org/html5/markup/input.range.html
> [3] Html5 float datatype: http://dev.w3.org/html5/markup/datatypes.html#common.data.float

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

[jira] [Updated] (WICKET-3591) NumberTextField and RangeTextField should always render/parse its value with English locale

Posted by "Attila Király (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Király updated WICKET-3591:
----------------------------------

    Description: 
Wicket started adding some support for the new Html5 input types. Among these are NumberTextField for number type [1] and RangeTextField for range type [2]. The Html5 spec mandates that the "value", "min", "max" attributes for these inputs are floating point numbers. Html5 spec also describes the format of a float number [3]. Simply to say it is a number formatted with English locale (for example: decimal mark is a period).

Wicket currently renders min and max spec compliant but renders the value wrong because it uses the client locale for that. Which means for example for a Hungarian client it will generate "3,14" instead "3.14". This breaks the custom widgets used by browsers for these new inputs (Chrome and Opera have custom ui, FF and IE stil use plain text field) because they expect the value with a period decimal mark. This means that browsers will post the value formatted in English locale too so parsing is also broken for these on the wicket server side because the client locale is used there also.

Imho wicket should always use the English locale for rendering/parsing these values in case of these input types.

To reproduce you can use the form examples from "wicket-html5-examples" in the wicketstuff project (I found this bug there).

[1] Html5 input number type: http://dev.w3.org/html5/markup/input.number.html
[2] Html5 input range type: http://dev.w3.org/html5/markup/input.range.html
[3] Html5 float datatype: http://dev.w3.org/html5/markup/datatypes.html#common.data.float

  was:
Wicket started adding some support for the new Html5 input types. Among these are NumberTextField for number type [1] and RangeTextField for range type [2]. The Html5 spec mandates that the "value", "min", "max" attributes for these inputs are floating point numbers. Html5 spec also describes the format of a float number [3]. Simply to say it is a number formatted with English locale (for example: decimal mark is a period).

Wicket currently renders min and max spec compliant but renders the value wrong because it uses the client locale for that. Which means for example for a Hungarian client it will generate "3,14" instaed "3.14". This breaks the custom widgets used by browsers for these new inputs (Chrome and Opera have custom ui, FF and IE stil use plain text field) because they except the value with a period decimal mark. This means that browsers will post the value formatted in English locale too so parsing is also broken for these on the wicket server side because the client locale is used there also.

Imho wicket should always use the English locale for rendering/parsing these values in case of these input types.

To reproduce you can use the form examples from "wicket-html5-examples" in the wicketstuff project (I found this bug there).

[1] Html5 input number type: http://dev.w3.org/html5/markup/input.number.html
[2] Html5 input range type: http://dev.w3.org/html5/markup/input.range.html
[3] Html5 float datatype: http://dev.w3.org/html5/markup/datatypes.html#common.data.float


> NumberTextField and RangeTextField should always render/parse its value with English locale
> -------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3591
>                 URL: https://issues.apache.org/jira/browse/WICKET-3591
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>         Environment: client with a locale where the decimal mark is not a period (for example: Hungarian locale)
>            Reporter: Attila Király
>
> Wicket started adding some support for the new Html5 input types. Among these are NumberTextField for number type [1] and RangeTextField for range type [2]. The Html5 spec mandates that the "value", "min", "max" attributes for these inputs are floating point numbers. Html5 spec also describes the format of a float number [3]. Simply to say it is a number formatted with English locale (for example: decimal mark is a period).
> Wicket currently renders min and max spec compliant but renders the value wrong because it uses the client locale for that. Which means for example for a Hungarian client it will generate "3,14" instead "3.14". This breaks the custom widgets used by browsers for these new inputs (Chrome and Opera have custom ui, FF and IE stil use plain text field) because they expect the value with a period decimal mark. This means that browsers will post the value formatted in English locale too so parsing is also broken for these on the wicket server side because the client locale is used there also.
> Imho wicket should always use the English locale for rendering/parsing these values in case of these input types.
> To reproduce you can use the form examples from "wicket-html5-examples" in the wicketstuff project (I found this bug there).
> [1] Html5 input number type: http://dev.w3.org/html5/markup/input.number.html
> [2] Html5 input range type: http://dev.w3.org/html5/markup/input.range.html
> [3] Html5 float datatype: http://dev.w3.org/html5/markup/datatypes.html#common.data.float

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

[jira] [Updated] (WICKET-3591) NumberTextField and RangeTextField should always render/parse its value with English locale

Posted by "Attila Király (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Király updated WICKET-3591:
----------------------------------

    Attachment: fix-WICKET-3591.patch

Attaching a patch that fixes this bug.

> NumberTextField and RangeTextField should always render/parse its value with English locale
> -------------------------------------------------------------------------------------------
>
>                 Key: WICKET-3591
>                 URL: https://issues.apache.org/jira/browse/WICKET-3591
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-core
>    Affects Versions: 1.5-RC3
>         Environment: client with a locale where the decimal mark is not a period (for example: Hungarian locale)
>            Reporter: Attila Király
>         Attachments: fix-WICKET-3591.patch
>
>
> Wicket started adding some support for the new Html5 input types. Among these are NumberTextField for number type [1] and RangeTextField for range type [2]. The Html5 spec mandates that the "value", "min", "max" attributes for these inputs are floating point numbers. Html5 spec also describes the format of a float number [3]. Simply to say it is a number formatted with English locale (for example: decimal mark is a period).
> Wicket currently renders min and max spec compliant but renders the value wrong because it uses the client locale for that. Which means for example for a Hungarian client it will generate "3,14" instead "3.14". This breaks the custom widgets used by browsers for these new inputs (Chrome and Opera have custom ui, FF and IE stil use plain text field) because they expect the value with a period decimal mark. This means that browsers will post the value formatted in English locale too so parsing is also broken for these on the wicket server side because the client locale is used there also.
> Imho wicket should always use the English locale for rendering/parsing these values in case of these input types.
> To reproduce you can use the form examples from "wicket-html5-examples" in the wicketstuff project (I found this bug there).
> [1] Html5 input number type: http://dev.w3.org/html5/markup/input.number.html
> [2] Html5 input range type: http://dev.w3.org/html5/markup/input.range.html
> [3] Html5 float datatype: http://dev.w3.org/html5/markup/datatypes.html#common.data.float

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