struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4581) BigDecimal are not converted according context locale
Date Sat, 02 Jan 2016 15:35:39 GMT

    [ https://issues.apache.org/jira/browse/WW-4581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15076546#comment-15076546
] 

Lukasz Lenart commented on WW-4581:
-----------------------------------

You can always use your own converter:
{noformat}
# syntax: <type> = <converterClassName>
java.math.BigDecimal = com.acme.MyBigDecimalConverter 
{noformat}

https://struts.apache.org/docs/type-conversion.html#TypeConversion-ApplyingaTypeConverterforanapplication

> BigDecimal are not converted according context locale
> -----------------------------------------------------
>
>                 Key: WW-4581
>                 URL: https://issues.apache.org/jira/browse/WW-4581
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.3.20
>         Environment: Glassfish 4.0, Java 7
>            Reporter: Arturo Imposimato
>             Fix For: 2.5
>
>
> Calling an action, it's impossible to assign a value like "123,45" to all properties
which type is java.math.BigDecimal, even if context locale decimal separator is comma.
> Same string converted in a java.lang.Double works.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message