You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Rafael Santini <ra...@santini.eti.br> on 2015/04/13 01:13:42 UTC

Commons: mc:exporterActionListener: Converters

Hi,

I have a datatable with data types others than string, like Date and 
BigDecimal. When the datatable is exported to XLS, the data is written as 
raw data, like 2015-04-12 00:00:00.0 instead of 12/04/2015 (dd/mm/yyyy) and 
250.00 instead of 250,00 (##0.00 - locate pt_BR). Am I missing something or 
this is a limitation of mc:exporterActionListener?

Thanks,

Rafael Santini


Re: Commons: mc:exporterActionListener: Converters

Posted by Mike Kienenberger <mk...@gmail.com>.
Sorry for the late reply.

I don't use the commons exporter, but you could take a look at the
source code and determine if there's something more you can do.

http://svn.apache.org/repos/asf/myfaces/commons/trunk/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/

The data conversion is specifically handled in

http://svn.apache.org/repos/asf/myfaces/commons/trunk/myfaces-commons-components/src/main/java/org/apache/myfaces/commons/exporter/util/ComponentUtils.java
in getStringValue().

It looks like you might be able to define converters for the base data
types under some situations, but I haven't tried it.
We are certainly willing to apply patches to improve the API if you
have something specific in mind.

It also looks like we are lacking in decent documentation for this
component, and we'd gladly accept contributions in that area as well.


On Sun, Apr 12, 2015 at 7:13 PM, Rafael Santini <ra...@santini.eti.br> wrote:
> Hi,
>
> I have a datatable with data types others than string, like Date and
> BigDecimal. When the datatable is exported to XLS, the data is written as
> raw data, like 2015-04-12 00:00:00.0 instead of 12/04/2015 (dd/mm/yyyy) and
> 250.00 instead of 250,00 (##0.00 - locate pt_BR). Am I missing something or
> this is a limitation of mc:exporterActionListener?
>
> Thanks,
>
> Rafael Santini
>