tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Néstor Boscán <>
Subject RE: DataGrid x Internationalization
Date Sat, 19 Feb 2005 02:44:00 GMT
Hi Freddy

You're right, we can internationalize the DataGrid Tag. Because you're
working with internationalization I would like to know if this solution fits
your needs. 

We can use the NumberFormat.getInstance (Locale locale),
DateFormat.getInstance (int style, Locale locale) and apply the pattern
using the applyLocalizedPattern method. I can get the Locale object through
an attribute in the datagrid tag and if it's not defined I can use the JSP
Locale. What do you think?


Néstor Boscán

-----Mensaje original-----
De: Freddy Mallet [] 
Enviado el: Viernes, 18 de Febrero de 2005 11:24 a.m.
Asunto: DataGrid x Internationalization

Hello Nestor,

I've seen your answers to internationalize DataGrid but there is still
something that I can't understand:

Indeed, there is a workaround to internationalize header and footer by using
JSTL before the DataGrid and then retrieve formatted value through EL in the
DataGrid, but how do you proceed to internationalize item value ?

It seems to me that formatValue (Object value, String pattern) method of
DataGridTag class should for example get instance of DecimalFormat through
NumberFormat.getInstance(Locale loc) to format a number instead of using
DecimalFormat constructor. Moreover, in that case we could use the Local
instance set by <fmt:setLocale> JSTL tag and I think DataGrid would be then
totally internationalized.

But perhaps there is something that I've missed.

thanks for your help,


PS: I've forgotten to say that datagrid is a very useful taglib..

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message