You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2015/04/10 12:30:12 UTC
[jira] [Comment Edited] (TAP5-2409) type="number" fails when
decimal separator isn't "."
[ https://issues.apache.org/jira/browse/TAP5-2409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14489327#comment-14489327 ]
Jochen Kemnade edited comment on TAP5-2409 at 4/10/15 10:29 AM:
----------------------------------------------------------------
There's even a problem when rendering a {{TextField}} with {{type="number"}} with an English locale. For a value of {{1234.56}}, Tapestry renders {{<input type="number" value="12,345.67">}}, which isn't correct (should be {{value="12345.67"}}).
was (Author: jkemnade):
There's even a problem when rendering a {{TextField}} with {{type="number"}} with an English locale. For a value of {{1234.56}}, Tapestry renders {{<input type="number" value="12,345.67">}}, which isn't correct.
> type="number" fails when decimal separator isn't "."
> ----------------------------------------------------
>
> Key: TAP5-2409
> URL: https://issues.apache.org/jira/browse/TAP5-2409
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.4
> Reporter: Geoff Callender
>
> This probably affects versions before 5.4 too.
> I have BigDecimal fields that I'm editing with TextField. On mobile devices I would like a numeric keyboard to pop up, so I added type="number".
> This all worked just fine in English, but then I switched locale to French and found Tapestry's client-side validation rejecting it as not a number.
> Digging around, I found that with type="number", the W3C spec requires the browser to translate the field value to a String with a "." decimal separator. The problem for Tapestry is that Tapestry's validation always expects the field value to be untouched and in the format of the locale.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)