Franc Crosses

Greenhorn
+ Follow
since Nov 29, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Franc Crosses

In the DB, the column is of type "timestamp without time zone".

This is the problem. If no time zone is specified, how can the converter know how to adjust the time?
10 years ago
JSF
I have a bean with a field "lastUpdate", which is of type Date, and its usual getter/setter.
I use JPA to persist my beans into a PostGreSql DB.

I want to have my lastUpdate be saved in UTC, so before setting it, I set the time zone:


So, if lastUpdate is "2013-08-02 12:17:05" (Europe/Zurich), in the DB I have "2013-08-02 10:17:05" (UTC), which is what I want.

When I display the date back, I also want to have it according to my time zone, so I thought I could use the f:convertDateTime and setting the timeZone="xxx".



Reading other answers, I tried to set the

javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE

too, but the result is always the same: by displaying the date I get 2013-08-02 10:17:05 instead 2013-08-02 12:17:05.

I think that if the converter does its job correctly, if I want to display 2013-08-02 10:17:05 (UTC) according my time zone, setting the time zone to mine (Europe/Zurich), I should get 2013-08-02 12:17:05

Do I miss something??

In the DB, the column is of type "timestamp without time zone". Does it have some effect?
10 years ago
JSF
Hi to everyone,

I have a simple problem and I hope that the solution is also so simple...

The items in my selectManyListbox all comes already selected per default and I don't want this.

I searched everywhere for possible options but I found nothing.

Can someone help me, please?

Thank you in advance
Francesco
12 years ago
JSF
Hi to all,

I have a simple class, i.e




I want to make a factory for this class, so that each collection will be instantiated to a subclass I will define:



Factory call:

TestRun tr = (TestRun) BusinessObjectFactory.create(TestRun.class);

My question is:

How Have I to instantiate the collection with the right parameter:
new HashSet<Integer>(), new ArrayList<String>(), ...

I tried with fieldObject = new HashSet<?>(); ecc
but it' not possible...

Can someone help me please?

Thanks in advance

Francesco
13 years ago