You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by omidh <om...@gmx.de> on 2007/05/07 06:32:33 UTC

t:inputCalendar

Hi all,

I have a little problem with tomahawk...
When Insert a t:inputCalendar field everything works fine...
But when I try to save the Date in a Backing Bean in a Date field, also
these works ;),
but by printing out the Date again, I get all the time one day befor the
selected Date printed out...
Is these a bug in tomahawk? or a config failure, here my Tag:

<f:subview id="date_field" rendered="#{datatype.type == 'date'}">
							<t:inputCalendar id="inputdate_field"
monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
popupButtonStyleClass="standard_bold"
				                currentDayCellClass="currentDayCell"
value="#{datatype.value_date}" 
				                renderAsPopup="true" popupTodayString="Today: "
				                popupDateFormat="MM/dd/yyyy" popupWeekString="Week: "
				                helpText="MM/DD/YYYY"/>
						</f:subview>

you cann also what I described on: http://www.irian.at/myfaces/calendar.jsf
, click on a date in the Calender Form an look whats printed out.

thanks in advance,
Omid
-- 
View this message in context: http://www.nabble.com/t%3AinputCalendar-tf3701861.html#a10352028
Sent from the MyFaces - Users mailing list archive at Nabble.com.


AW: t:inputCalendar f:convertDateTime DaylightSaving

Posted by Holger Igel <ho...@cosys.de>.
Yes the JDK handles the daylight saving. I found the solution. You have to
use a TimeZone ID like 
Europe/Amsterdam
Europe/Andorra
Europe/Belgrade
Europe/Berlin

Java.util.TimeZone

String ids[] = TimeZone.getAvailableIDs();
		for (int i = 0; i < ids.length; i++) {
			log.debug(ids[i]);
		}

My mistake was to take GMT+1 or GMT+2.
If we are in daylight saving time we have GMT+2 else GMT+1.
If I use 
<f:convertDateTime type="both" dateStyle="medium" timeZone="Europe/Berlin"/>

It works fine !

Regards
Holger Igel




________________________________________
Von: Simon Lessard [mailto:simon.lessard.3@gmail.com] 
Gesendet: Donnerstag, 28. Juni 2007 15:13
An: MyFaces Discussion; werner.punz@gmail.com
Betreff: Re: t:inputCalendar f:convertDateTime

Hello,

Yes, the JDK take care of that. However, there's some potential problems
like you need close to latest JVM to include this year changes on daylight
saving, and there's also an issue with a very specific date around 1930 that
I forgot which is very buggy (selecting the day before)... 


Regards,

~ Simon
On 6/28/07, Werner Punz <we...@gmail.com> wrote:
Holger Igel schrieb:
> But how can you solve the daylightsaving problem ? do we have to change
> everytime the timezone attribute ? in germany we could have the following
> values:
>
> <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+2"/> 
>
> or
>
> <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+1"/>
>
> Holger
>
Not sure here, but doesnt the JDK take care of the daylight savings in a 
specific timezone by itself?
GMT+1 should be static shouldn´t it?



Re: t:inputCalendar f:convertDateTime

Posted by Simon Lessard <si...@gmail.com>.
Hello,

Yes, the JDK take care of that. However, there's some potential problems
like you need close to latest JVM to include this year changes on daylight
saving, and there's also an issue with a very specific date around 1930 that
I forgot which is very buggy (selecting the day before)...


Regards,

~ Simon

On 6/28/07, Werner Punz <we...@gmail.com> wrote:
>
> Holger Igel schrieb:
> > But how can you solve the daylightsaving problem ? do we have to change
> > everytime the timezone attribute ? in germany we could have the
> following
> > values:
> >
> > <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+2"/>
> >
> > or
> >
> > <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+1"/>
> >
> > Holger
> >
> Not sure here, but doesnt the JDK take care of the daylight savings in a
> specific timezone by itself?
> GMT+1 should be static shouldn´t it?
>
>

Re: t:inputCalendar f:convertDateTime

Posted by Werner Punz <we...@gmail.com>.
Holger Igel schrieb:
> But how can you solve the daylightsaving problem ? do we have to change
> everytime the timezone attribute ? in germany we could have the following
> values:
> 
> <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+2"/>
> 
> or
> 
> <f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+1"/>
> 
> Holger
> 
Not sure here, but doesnt the JDK take care of the daylight savings in a
specific timezone by itself?
GMT+1 should be static shouldn´t it?


RE: t:inputCalendar f:convertDateTime

Posted by Holger Igel <ho...@cosys.de>.
But how can you solve the daylightsaving problem ? do we have to change
everytime the timezone attribute ? in germany we could have the following
values:

<f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+2"/>

or

<f:convertDateTime type="both" dateStyle="medium" timeZone="GMT+1"/>

Holger


-----Ursprüngliche Nachricht-----
Von: David Delbecq [mailto:delbd+jakarta@oma.be] 
Gesendet: Mittwoch, 27. Juni 2007 17:33
An: MyFaces Discussion
Betreff: Re: t:inputCalendar

You can define the timezone in a converter. Here, we define a converter
(<f:dateTimeConverter .../>) with a specific format and timeZone for
both inputCalendar et outputText to keep date correct. And by this we
are sure to always work in our current TimeZone on user interface :D

(PS: i think latest svn version of tomahawk added a timezone attribute)

En l'instant précis du 27/06/07 17:26, galletti s'exprimait en ces termes:
> How can you do that?
> It seems like t:inputCalendar does not have a "timezone" attribute.
>
> Any help?
>
>
> Simon Kitching-3 wrote:
>   
>> The default timezone for date controls is UTC aka GMT.
>>
>> Set the timezone attribute of the component to control what timezone is 
>> used.
>>
>>
>> omidh wrote:
>>     
>>> Hi all,
>>>
>>> I have a little problem with tomahawk...
>>> When Insert a t:inputCalendar field everything works fine...
>>> But when I try to save the Date in a Backing Bean in a Date field, also
>>> these works ;),
>>> but by printing out the Date again, I get all the time one day befor the
>>> selected Date printed out...
>>> Is these a bug in tomahawk? or a config failure, here my Tag:
>>>
>>> <f:subview id="date_field" rendered="#{datatype.type == 'date'}">
>>> 							<t:inputCalendar
id="inputdate_field"
>>> monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
>>> popupButtonStyleClass="standard_bold"
>>>
currentDayCellClass="currentDayCell"
>>> value="#{datatype.value_date}" 
>>> 				                renderAsPopup="true"
popupTodayString="Today: "
>>> 				                popupDateFormat="MM/dd/yyyy"
popupWeekString="Week: "
>>> 				                helpText="MM/DD/YYYY"/>
>>> 						</f:subview>
>>>
>>> you cann also what I described on:
>>> http://www.irian.at/myfaces/calendar.jsf
>>> , click on a date in the Calender Form an look whats printed out.
>>>
>>> thanks in advance,
>>> Omid
>>>       
>>
>>     
>
>   


Re: t:inputCalendar

Posted by David Delbecq <de...@oma.be>.
You can define the timezone in a converter. Here, we define a converter
(<f:dateTimeConverter .../>) with a specific format and timeZone for
both inputCalendar et outputText to keep date correct. And by this we
are sure to always work in our current TimeZone on user interface :D

(PS: i think latest svn version of tomahawk added a timezone attribute)

En l'instant précis du 27/06/07 17:26, galletti s'exprimait en ces termes:
> How can you do that?
> It seems like t:inputCalendar does not have a "timezone" attribute.
>
> Any help?
>
>
> Simon Kitching-3 wrote:
>   
>> The default timezone for date controls is UTC aka GMT.
>>
>> Set the timezone attribute of the component to control what timezone is 
>> used.
>>
>>
>> omidh wrote:
>>     
>>> Hi all,
>>>
>>> I have a little problem with tomahawk...
>>> When Insert a t:inputCalendar field everything works fine...
>>> But when I try to save the Date in a Backing Bean in a Date field, also
>>> these works ;),
>>> but by printing out the Date again, I get all the time one day befor the
>>> selected Date printed out...
>>> Is these a bug in tomahawk? or a config failure, here my Tag:
>>>
>>> <f:subview id="date_field" rendered="#{datatype.type == 'date'}">
>>> 							<t:inputCalendar id="inputdate_field"
>>> monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
>>> popupButtonStyleClass="standard_bold"
>>> 				                currentDayCellClass="currentDayCell"
>>> value="#{datatype.value_date}" 
>>> 				                renderAsPopup="true" popupTodayString="Today: "
>>> 				                popupDateFormat="MM/dd/yyyy" popupWeekString="Week: "
>>> 				                helpText="MM/DD/YYYY"/>
>>> 						</f:subview>
>>>
>>> you cann also what I described on:
>>> http://www.irian.at/myfaces/calendar.jsf
>>> , click on a date in the Calender Form an look whats printed out.
>>>
>>> thanks in advance,
>>> Omid
>>>       
>>
>>     
>
>   


Re: t:inputCalendar

Posted by galletti <pk...@archetypon.com>.
How can you do that?
It seems like t:inputCalendar does not have a "timezone" attribute.

Any help?


Simon Kitching-3 wrote:
> 
> The default timezone for date controls is UTC aka GMT.
> 
> Set the timezone attribute of the component to control what timezone is 
> used.
> 
> 
> omidh wrote:
>> Hi all,
>> 
>> I have a little problem with tomahawk...
>> When Insert a t:inputCalendar field everything works fine...
>> But when I try to save the Date in a Backing Bean in a Date field, also
>> these works ;),
>> but by printing out the Date again, I get all the time one day befor the
>> selected Date printed out...
>> Is these a bug in tomahawk? or a config failure, here my Tag:
>> 
>> <f:subview id="date_field" rendered="#{datatype.type == 'date'}">
>> 							<t:inputCalendar id="inputdate_field"
>> monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
>> popupButtonStyleClass="standard_bold"
>> 				                currentDayCellClass="currentDayCell"
>> value="#{datatype.value_date}" 
>> 				                renderAsPopup="true" popupTodayString="Today: "
>> 				                popupDateFormat="MM/dd/yyyy" popupWeekString="Week: "
>> 				                helpText="MM/DD/YYYY"/>
>> 						</f:subview>
>> 
>> you cann also what I described on:
>> http://www.irian.at/myfaces/calendar.jsf
>> , click on a date in the Calender Form an look whats printed out.
>> 
>> thanks in advance,
>> Omid
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/t%3AinputCalendar-tf3701861.html#a11326663
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:inputCalendar

Posted by Werner Punz <we...@gmail.com>.
::SammyRulez:: schrieb:
> Are there any convenient way to do so once for app or should we spam
> timezone attribute in every inputCalendar component?
> 
you could use a central application scoped bean for delivering your
timezone attribute...


> 2007/5/7, omidh <om...@gmx.de>:
>>
>> Thank you very much Simon,
>> it worked.
>>
>> bye.
>>
>>
>> Simon Kitching-3 wrote:
>> >
>> > The default timezone for date controls is UTC aka GMT.
>> >
>> > Set the timezone attribute of the component to control what timezone is
>> > used.
>> >
>> >
>> > omidh wrote:
>> >> Hi all,
>> >>
>> >> I have a little problem with tomahawk...
>> >> When Insert a t:inputCalendar field everything works fine...
>> >> But when I try to save the Date in a Backing Bean in a Date field,
>> also
>> >> these works ;),
>> >> but by printing out the Date again, I get all the time one day
>> befor the
>> >> selected Date printed out...
>> >> Is these a bug in tomahawk? or a config failure, here my Tag:
>> >>
>> >> <f:subview id="date_field" rendered="#{datatype.type == 'date'}">
>> >>                                                     
>> <t:inputCalendar id="inputdate_field"
>> >> monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
>> >> popupButtonStyleClass="standard_bold"
>> >>                                             
>> currentDayCellClass="currentDayCell"
>> >> value="#{datatype.value_date}"
>> >>                                              renderAsPopup="true"
>> popupTodayString="Today: "
>> >>                                             
>> popupDateFormat="MM/dd/yyyy" popupWeekString="Week: "
>> >>                                              helpText="MM/DD/YYYY"/>
>> >>                                              </f:subview>
>> >>
>> >> you cann also what I described on:
>> >> http://www.irian.at/myfaces/calendar.jsf
>> >> , click on a date in the Calender Form an look whats printed out.
>> >>
>> >> thanks in advance,
>> >> Omid
>> >
>> >
>> >
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/t%3AinputCalendar-tf3701861.html#a10353718
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 


Re: t:inputCalendar

Posted by "::SammyRulez::" <sa...@gmail.com>.
Are there any convenient way to do so once for app or should we spam
timezone attribute in every inputCalendar component?

2007/5/7, omidh <om...@gmx.de>:
>
> Thank you very much Simon,
> it worked.
>
> bye.
>
>
> Simon Kitching-3 wrote:
> >
> > The default timezone for date controls is UTC aka GMT.
> >
> > Set the timezone attribute of the component to control what timezone is
> > used.
> >
> >
> > omidh wrote:
> >> Hi all,
> >>
> >> I have a little problem with tomahawk...
> >> When Insert a t:inputCalendar field everything works fine...
> >> But when I try to save the Date in a Backing Bean in a Date field, also
> >> these works ;),
> >> but by printing out the Date again, I get all the time one day befor the
> >> selected Date printed out...
> >> Is these a bug in tomahawk? or a config failure, here my Tag:
> >>
> >> <f:subview id="date_field" rendered="#{datatype.type == 'date'}">
> >>                                                      <t:inputCalendar id="inputdate_field"
> >> monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
> >> popupButtonStyleClass="standard_bold"
> >>                                              currentDayCellClass="currentDayCell"
> >> value="#{datatype.value_date}"
> >>                                              renderAsPopup="true" popupTodayString="Today: "
> >>                                              popupDateFormat="MM/dd/yyyy" popupWeekString="Week: "
> >>                                              helpText="MM/DD/YYYY"/>
> >>                                              </f:subview>
> >>
> >> you cann also what I described on:
> >> http://www.irian.at/myfaces/calendar.jsf
> >> , click on a date in the Calender Form an look whats printed out.
> >>
> >> thanks in advance,
> >> Omid
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/t%3AinputCalendar-tf3701861.html#a10353718
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 
::SammyRulez::
http://www.kyub.com/blog/
-----------------------------------------------------------------
La programmazione è per un terzo interpretazione e per due terzi ispirazione.
 E per un terzo mistificazione

Re: t:inputCalendar

Posted by omidh <om...@gmx.de>.
Thank you very much Simon,
it worked.

bye.


Simon Kitching-3 wrote:
> 
> The default timezone for date controls is UTC aka GMT.
> 
> Set the timezone attribute of the component to control what timezone is 
> used.
> 
> 
> omidh wrote:
>> Hi all,
>> 
>> I have a little problem with tomahawk...
>> When Insert a t:inputCalendar field everything works fine...
>> But when I try to save the Date in a Backing Bean in a Date field, also
>> these works ;),
>> but by printing out the Date again, I get all the time one day befor the
>> selected Date printed out...
>> Is these a bug in tomahawk? or a config failure, here my Tag:
>> 
>> <f:subview id="date_field" rendered="#{datatype.type == 'date'}">
>> 							<t:inputCalendar id="inputdate_field"
>> monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
>> popupButtonStyleClass="standard_bold"
>> 				                currentDayCellClass="currentDayCell"
>> value="#{datatype.value_date}" 
>> 				                renderAsPopup="true" popupTodayString="Today: "
>> 				                popupDateFormat="MM/dd/yyyy" popupWeekString="Week: "
>> 				                helpText="MM/DD/YYYY"/>
>> 						</f:subview>
>> 
>> you cann also what I described on:
>> http://www.irian.at/myfaces/calendar.jsf
>> , click on a date in the Calender Form an look whats printed out.
>> 
>> thanks in advance,
>> Omid
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/t%3AinputCalendar-tf3701861.html#a10353718
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:inputCalendar

Posted by Simon Kitching <si...@rhe.co.nz>.
The default timezone for date controls is UTC aka GMT.

Set the timezone attribute of the component to control what timezone is 
used.


omidh wrote:
> Hi all,
> 
> I have a little problem with tomahawk...
> When Insert a t:inputCalendar field everything works fine...
> But when I try to save the Date in a Backing Bean in a Date field, also
> these works ;),
> but by printing out the Date again, I get all the time one day befor the
> selected Date printed out...
> Is these a bug in tomahawk? or a config failure, here my Tag:
> 
> <f:subview id="date_field" rendered="#{datatype.type == 'date'}">
> 							<t:inputCalendar id="inputdate_field"
> monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader"
> popupButtonStyleClass="standard_bold"
> 				                currentDayCellClass="currentDayCell"
> value="#{datatype.value_date}" 
> 				                renderAsPopup="true" popupTodayString="Today: "
> 				                popupDateFormat="MM/dd/yyyy" popupWeekString="Week: "
> 				                helpText="MM/DD/YYYY"/>
> 						</f:subview>
> 
> you cann also what I described on: http://www.irian.at/myfaces/calendar.jsf
> , click on a date in the Calender Form an look whats printed out.
> 
> thanks in advance,
> Omid