ClassName

atg.droplet.CurrencyConversionFormatter

Component

/atg/dynamo/droplet/CurrencyConversionFormatter

The CurrencyConversionFormatter servlet bean can be used to convert and format a numeric amount. The amount can be converted from one currency to another.

Input Parameters

currency
The number to convert and format.

locale
The source locale of the currency. For example, if sourceLocale is en_US then currency is expressed in US dollars. This value can be either a java.util.Locale object or a String that represents a locale. If you want this to use Euro currency, the variant of the locale must be EURO. This parameter is optional, if it is not provided then the default locale is used.

targetLocale
The target locale is the locale where the currency is converted. This conversion uses exchangeRates property in the CurrencyConversionTagConverter and the locale.

euroSymbol
This optional parameter is used if the target locale is using Euro currency. If provided, this parameter is used as the Euro symbol. This is useful because the commonly-used character set ISO Latin-1 (ISO 8859-1) does not include the Euro character.

Output Parameters

formattedCurrency
Represents the formatted currency.

Open Parameters

output
The oparam always rendered.

Example
<dsp:droplet name="/atg/dynamo/droplet/CurrencyConversionFormatter">
  <dsp:param param="price.listPrice" name="currency"/>
  <dsp:param value="en_US" name="locale"/>
  <dsp:param value="de_DE_EURO" name="targetLocale"/>
  <dsp:param value="&euro;" name="euroSymbol"/>
  <dsp:oparam name="output">
    <dsp:valueof valueishtml="true" param="formattedCurrency">no
         price</dsp:valueof>
  </dsp:oparam>
</dsp:droplet>
 
loading table of contents...