The jstl eqivalent of bean:message allows you to pass arguments via the tag
body, so you can use another tag inside the body:

                <fmt:message key="cart.amount">
                        <fmt:param>
                                <fmt:formatNumber value="${total}"
type="CURRENCY"/>
                        </fmt:param>
                </fmt:message>

Paul

-----Original Message-----
From: Carl [mailto:[EMAIL PROTECTED]
Sent: 18 November 2003 23:44
To: [EMAIL PROTECTED]
Subject: bean:message MessageFormat and number formating


Hi,

I've recently switch to a resource.properties file to externalize all
text from jsp (in the perspective of translation of the site)

The site is a classic e-commerce web site, so I dsiplay a Cart and the
amount of the products in the custumer's cart.

In my old jsp I wrote :
<fmt:formatNumber value="${total}" type="CURRENCY"/>
in order to format the price in a sentence like "Total amount $ 150."

Now I'm writting
cart.amount=Total amount {0}.
in the resource.properties.

And in the JSP :
<bean-el:message key="cart.amount" arg0="${user.amount}"/>

finally I loose the price formatting porvided by the <fmt:formatNumber >
tag.

Is there a way to use a MessageFormat and have the parameters formatted
like <fmt:formatNumber > do ?

Thanks for all suggestions,

Carl


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


**************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to