Hi Cosma,

Cosma Colanicchia wrote:
> Thank you Volker,
> 
> I've read the discussion and the JIRA issue, but I'm still not sure about a
> solution. I'm using a recent snapshot of myfaces-impl-1.1.4 and a snapshot
> of tomahawk-1.1.2, so it should be already addressed in my lib version
> ([#MYFACES-506] is marked as fixed in 1.1.1), isn't it?
> 
> Do I have to pass a timeZone="something" to workaround this issue?

Yes the solution was adding a
<f:dateTimeConverter timeZone="#{bean.timeZone}" />
to the t:inputDate


The problem is this:

the spec says the default timezone for a dateTimeConverter is GMT.

if no converter is explicit specified a default converter is taken to
convert java.util.Date values, which is the case at the t:inputDate.

if you use a Date as value for a h:outputText the default converter is
also taken, and the date shoult rendered equal to the inputDate tag.

But if you use value="the date is #{bean.date}." at the h:outputText,
then the value type of the expression is String and the date part is not
converted by a converter (just a toString() is done)!

e.g.

<h:outputText value="The date is #{bean.date}" />

<h:outputText value="The date is "/><h:outputText value="#{bean.date}"/>

this two lines renders the same text with (if your servers default
timezone is != GMT) different times.



Regards,
  Volker


> 
> Thank you again
> Cosma
> 
> 
> On 5/10/06, Volker Weber <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi,
>>
>> see
>> http://issues.apache.org/jira/browse/MYFACES-506
>>
>> and this thread
>>
>> http://www.mail-archive.com/[email protected]/msg09779.html
>>
>> Hope this helps.
>>
>>
>> Regards,
>>   Volker
>>
>>
>> Cosma Colanicchia wrote:
>> > Hi,
>> > I'm using the <t:inputDate> component, but it is rendered always a
>> > day-after the actual value of bound property. I use the component this
>> way:
>> >
>> > <t:inputDate id="birthDate" value="#{peopleAction.person.birthDate }"
>> > required="true" type="date" popupCalendar="true"/>
>> >
>> > the bound variable is of type java.util.date. I'm sure that the
>> > component is wrong because I tried to render, near the inputDate, an
>> > inputText for the same property and this one renders the correct date.
>> > What's wrong?
>> >
>> > TIA, Cosma
>>
>> -- 
>> Don't answer to From: address!
>> Mail to this account are droped if not recieved via mailinglist.
>> To contact me direct create the mail address by
>> concatenating my forename to my senders domain.
>>
> 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

Reply via email to