[ 
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

Reply via email to