Author |
Message |
06/07/2011 14:32:18
|
saala
Power User
Joined: 14/04/2008 13:12:41
Messages: 85
Offline
|
Hi,
we use FIXGRIDBinding.Exporter.exportToTabSeparatedStringWholeGrid() to get the content as a csv string. The problem is, that the content of the date fields in the grid are formatted in a different style then on the client side. Maybe you use the server side locale/language. It would be much better if the content is formatted in the same style as on the client.
(e.g. if you copy the content to Excel the values are displayed as text)
Michael
|
|
|
06/07/2011 14:52:14
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
Hi,
if you use the normal grid-export and use the normal CSV download: then there is a system.xml parameter ("fixgridexportcharactersetcsv") by which you can define the encoding used internally to build the file. THe default is "UTF-8".
If yuo directly use the functions, then it's your code to transfer Java-Strings into "File-Strings"... (but I am pretty sure, that's not what you are doing, so I do not further explanations here...: if I am wrong, please tell me.)
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
06/07/2011 15:04:44
|
saala
Power User
Joined: 14/04/2008 13:12:41
Messages: 85
Offline
|
Hi,
I give you an example: The grid contains a t:calendarfield; on the client the value is rendered to '27.05.2011', but exportToTabSeparatedStringWholeGrid() returns 'May 27, 2011'
Michael
|
|
|
06/07/2011 15:30:14
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
Oh, now I got it! ;-)
Yes, we are using the server side localization by default. This is not the very perfect idea...
We will change this short term.
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
09/08/2011 14:22:04
|
saala
Power User
Joined: 14/04/2008 13:12:41
Messages: 85
Offline
|
Hi,
is this problem fixed ? (I checked version 08/08 and I think it's still open)
Michael
|
|
|
09/08/2011 15:53:04
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
Hi,
yes, still in 08.08. - sorry.
We now fixed - please tell us if you require a short term version.
Regards, Björn
PS: we are using the server side langauge (FacesContec.currentIsntance().getViewRoot().getLocale()) for proper formatting
|
Björn Müller, CaptainCasa GmbH |
|
|
15/02/2019 13:05:57
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hello Björn,
this is not fixed for exportToTabSeparatedStringWholeGrid()!
I get decimal points, even if
FacesContext.getCurrentInstance().getViewRoot().getLocale() is DE.
HttpSessionAccess.getCurrentRequest().getHeader("eclnt-language") is DE
and Locale.getDefault() (OS locale) is US.
And takeoverclientlocalesettings="true".
Is there any chance to get decimal commas without changing the server's OS locale?
Regards,
Joachim
|
|
|
16/02/2019 06:35:30
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
...from next update on the problem is solved...
Thanks + regards! Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
16/02/2019 08:03:24
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hi Björn,
Swing-Client?
Regards,
Joachim
|
|
|
16/02/2019 08:25:05
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
...all clients! ;-)
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
19/02/2019 05:34:49
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
...solution is part of 20190218... - Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
20/02/2019 12:39:04
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
Hi Björn,
I checked the new version. Using Wildfly 8.2.1 on US-en Debian 9.
Session-defaults.xml contains
<sessiondefaults
style="connect"
language="de"
country="DE"
takeoverclientlocalesettings="true"
/>
Exporter gives me decimal points!
Regards,
Joachim
|
|
|
20/02/2019 13:49:14
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
...well: your sessiondefaults-definition is not totally correct:
on the one hand you say: take this country/languare, on the other hand you say "take over client localization".
Decide for one! ;-)
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
20/02/2019 14:51:10
|
unger
Power User
Joined: 22/07/2008 05:19:28
Messages: 261
Offline
|
I have an us-en server. The client locale is de-de.
Finally I want override the server's locale. That happens as I can see it in the faces context.
Code:
15:46:02,643 INFO [stdout] (default task-1) Locale from Request - Header:de
15:46:02,659 INFO [stdout] (default task-1) Locale from Server (Faces):Germany_German
15:46:02,659 INFO [stdout] (default task-1) Locale from Server (Faces):DE_de
15:46:02,659 INFO [stdout] (default task-1) Locale from Server:United States_English
15:46:02,661 INFO [stdout] (default task-1) Locale from Server:US_en
from
Code:
String l = HttpSessionAccess.getCurrentRequest().getHeader("eclnt-language");
System.out.println("Locale from Request - Header:" + l);
Locale l2 = FacesContext.getCurrentInstance().getViewRoot().getLocale();
System.out.println("Locale from Server (Faces):" + l2.getDisplayCountry() + "_" + l2.getDisplayLanguage());
System.out.println("Locale from Server (Faces):" + l2.getCountry() + "_" + l2.getLanguage());
Locale l3 = Locale.getDefault();
System.out.println("Locale from Server:" + l3.getDisplayCountry() + "_" + l3.getDisplayLanguage());
System.out.println("Locale from Server:" + l3.getCountry() + "_" + l3.getLanguage());
The exporter renderes for US-en locale.
Regards,
Joachim
|
|
|
21/02/2019 05:34:57
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5523
Offline
|
After direct communication: wrong CaptainCasa-version was installed in your test system... - Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|