Data Exporter xls locale

UI Components for JSF
Post Reply
RalfScania
Posts: 81
Joined: 26 Sep 2012, 12:51

26 Jul 2021, 10:53

Hi,
in primefaces 8, data exporter header was picking up the text from the header facet.
Now it seems you need the headerText in the column attribute to make the locale work?

It seems header facet is picking up the wrong locale resource.
Also, date fields and numbers turn out to be en and not the preferred de locale.

I tried to set the datatable locale, but no luck.
Anything I'm missing here?

//Ralf
Primefaces 8.0.4, MyFaces 2.2.8, Tomcat 9.0.8

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

26 Jul 2021, 14:19

Lots of XLS DataExporter work in the last year around Numbers and Currency that is not in 8.0.4.

See:
https://github.com/primefaces/primefaces/issues/7166
https://github.com/primefaces/primefaces/issues/6648
https://github.com/primefaces/primefaces/issues/6430
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

RalfScania
Posts: 81
Joined: 26 Sep 2012, 12:51

26 Jul 2021, 14:34

Ok, guess I have to point it out more clearly:

The problem exists in PF 10.0.0 - 10.0.4

This one picks up the translation from resources_en.properties, but should pick up the resources.properties.

Code: Select all

 <p:column>
 	<f:facet name="header">
                        <h:outputText value="#{msg.global_productNo}"/>
	</f:facet>
	...
</p:column>
This one is working correct, picking up the value from resources.properties.

Code: Select all

 <p:column headerText="#{msg.global_productNo}">
	...
</p:column>
Also date conversion and number conversion stopped working with the update from 8 to PF10.

Date pattern is dd.MM.yyyy

Code: Select all

<h:outputText value="#{data.purchaseInvoiceDate}" rendered="#{data.productType ne '1'}">
                        <f:convertDateTime
                                pattern="#{msg.global_datePattern}"
                                timeZone="CET"/>
</h:outputText>
Result is 2021-07-26, but should be 26.07.2021


The next one is turning 4.000 to 4 in excel:

Code: Select all

 <h:outputText value="#{data.dealerDDAAmount}">
	<f:convertNumber maxFractionDigits="0"/>
 </h:outputText>
Primefaces 8.0.4, MyFaces 2.2.8, Tomcat 9.0.8

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

26 Jul 2021, 17:12

Can you create a PrimeFaces reproducer please using PrimeFaces Test. That way I can see all 3 of your issues?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 60 guests