Bug 33684 - Formatting Currency numbers : no currency symbol .
Summary: Formatting Currency numbers : no currency symbol .
Status: RESOLVED WONTFIX
Alias: None
Product: Taglibs
Classification: Unclassified
Component: I18N Taglib (show other bugs)
Version: 1.0
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-22 09:59 UTC by VERDON Christophe
Modified: 2009-07-10 00:36 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description VERDON Christophe 2005-02-22 09:59:29 UTC
When using the I18N taglib Implementation-Version: 1.0.N20041118, 
the "i18n:formatCurrency" never display the currency symbol. This bug occurs 
with different "codding styles" : 
<i18n:message key="genericCurrencyNumber"> 
    <i18n:messageArg value="<%=(Object) (new Float(sampleFloat))%>"/>
</i18n:message> 

or

<i18n:locale locale="<%=loc%>">
    <i18n:formatCurrency value="<%=(Object) (new Float(sampleFloat))%>"/>
    </i18n:formatCurrency> 
</i18n:locale>

The same problem can be seen in you example.

I run my applications in Websphere Studio Application Devlopper (WSAD) version 
5.1.2, in the Websphere Test Environment. Windows XP on a PC platform.

Furthermore, an enhanced feature seems to miss in this taglib, for the 
Currency format. The programmer shoult be abble to set the currency and its 
symbol, whithout any relationship with the user locale. 

For example, if I am in France and want to by an object from USA, the 
application must show me the price in $ (USD) but not in € (EUR).

Regards

Christophe
Comment 1 Kris Schneider 2005-02-22 23:00:24 UTC
I'm not sure I understand what you're trying to illustrate with your first
example. <i18n:message> is essentially just a taglib interface into
java.text.MessageFormat. Does your resource bundle contain something like:

genericCurrencyNumber={0,number,currency}

As for the second example, I'm really not sure why that wouldn't work. It should
be the equivalent of:

Format format = NumberFormat.getCurrencyInstance(loc);
String s = format.format(new Float(sampleFloat));

Which prints a currency symbol just fine.
Comment 2 Henri Yandell 2009-07-10 00:36:58 UTC
JSTL replaced the i18n taglib, so this won't be worked on.