Hi Mario,
I would think the best place would be in resource files to contain the
format to use, and put specific code in ActionForm beans.
As messages in resource files are already processed by
java.text.MessageFormat, you don't need a special tag to display a localized
currency, for instance:
In your English property file, write
amount.value=The amount is {0, number, currency}
and use it with
<struts:message key="amount.value" arg0="123.45" />
to display
The amount is $123.45
when the user use an English locale.
Your ActionForm bean can contain the code to parse locale dependant formats,
based on the user locale, and pass it to your business objects in an
independant format (converting the currencies values to DM, for instance).
Pierre M�tras
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 20, 2000 4:13 AM
Subject: Formating data for display
> Hello all,
>
> after playing a while with struts i have a little question. Where is the
> best place to put the formating code for the data, e.g. to formate date
> and currency values. A special tag, the form bean + action class or the
> model beans ???.
>
> The example application contains no hints in this direction.
>
> Any suggestion are welcome.
>
> bye
> Mario
>