You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/03/13 15:13:09 UTC
DO NOT REPLY [Bug 27636] New: -
uses applyLocalizedPattern to format numbers
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27636>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27636
<bean:write > uses applyLocalizedPattern to format numbers
Summary: <bean:write > uses applyLocalizedPattern to format
numbers
Product: Struts
Version: 1.1 Final
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: Other
Component: Custom Tags
AssignedTo: struts-dev@jakarta.apache.org
ReportedBy: psevestre@ciblis.com.br
The current implementation of the function formatValue() in class WriteTag uses
the applyLocalizedPatern() function to format a Number object when the format
string comes from a resource (by means of the formatKey property).
This behaviour implies that the corresponding resource bundle contains a
localized pattern, so, in my locale (pt_BR), a number format resource would be
written as "#.##0,00".
The problem is that if the default (and sole one) resource bundle contains this
localized pattern _and_ the user decides to use another locale (eg: en_US), this
localized pattern will be invalid since the number format object will be unable
to parse it.
So, my suggestion is to change the code to always use the applyPattern()
function instead of applyLocalizedPattern().
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org