You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Илья Нарыжный <ph...@ydn.ru> on 2020/01/13 05:05:17 UTC

Converters for Date/Time

Hello,

I have some fundamental question about Wicket:)
For users it's convenient when date-time has shown in their timezone.
So most of wicket devs, do that somehow like we did it here:
https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/property/date/ODateLabel.java
But question is: does it make sense to put conversion per time-zone
into DateConverter or that might broke something wicket
best-practices?

Thanks,
Ilya
---------------------------------------------
Orienteer(http://orienteer.org) - open source Business Application Platform

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Converters for Date/Time

Posted by Sven Meier <sv...@meiers.net>.
Hi,

values in feedback messages get converted too of course, so if you want 
that, a converter is a good option.
Note that components can use a specific converter by overriding 
createConverter().

Many options to choose from :)

Sven


On 13.01.20 17:52, Martin Terra wrote:
> How about feedback messages etc.?
>
> **
> Martin
>
> ma 13. tammik. 2020 klo 18.46 Sven Meier (sven@meiers.net) kirjoitti:
>
>> Hi,
>>
>> adapting to the client timezone can be done in the component, a
>> converter or a model. e.g.
>>
>>
>> https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
>>
>> Whatever fits your use-case. Maybe you want everything to be displayed
>> in the client timeZone -> register a global converter.
>>
>> Have fun
>> Sven
>>
>>
>> On 13.01.20 06:05, Илья Нарыжный wrote:
>>> Hello,
>>>
>>> I have some fundamental question about Wicket:)
>>> For users it's convenient when date-time has shown in their timezone.
>>> So most of wicket devs, do that somehow like we did it here:
>>>
>> https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/property/date/ODateLabel.java
>>> But question is: does it make sense to put conversion per time-zone
>>> into DateConverter or that might broke something wicket
>>> best-practices?
>>>
>>> Thanks,
>>> Ilya
>>> ---------------------------------------------
>>> Orienteer(http://orienteer.org) - open source Business Application
>> Platform
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Converters for Date/Time

Posted by Martin Terra <ma...@koodaripalvelut.com>.
How about feedback messages etc.?

**
Martin

ma 13. tammik. 2020 klo 18.46 Sven Meier (sven@meiers.net) kirjoitti:

> Hi,
>
> adapting to the client timezone can be done in the component, a
> converter or a model. e.g.
>
>
> https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
>
> Whatever fits your use-case. Maybe you want everything to be displayed
> in the client timeZone -> register a global converter.
>
> Have fun
> Sven
>
>
> On 13.01.20 06:05, Илья Нарыжный wrote:
> > Hello,
> >
> > I have some fundamental question about Wicket:)
> > For users it's convenient when date-time has shown in their timezone.
> > So most of wicket devs, do that somehow like we did it here:
> >
> https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/property/date/ODateLabel.java
> > But question is: does it make sense to put conversion per time-zone
> > into DateConverter or that might broke something wicket
> > best-practices?
> >
> > Thanks,
> > Ilya
> > ---------------------------------------------
> > Orienteer(http://orienteer.org) - open source Business Application
> Platform
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Converters for Date/Time

Posted by Sven Meier <sv...@meiers.net>.
Hi,

adapting to the client timezone can be done in the component, a 
converter or a model. e.g.

https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java

Whatever fits your use-case. Maybe you want everything to be displayed 
in the client timeZone -> register a global converter.

Have fun
Sven


On 13.01.20 06:05, Илья Нарыжный wrote:
> Hello,
>
> I have some fundamental question about Wicket:)
> For users it's convenient when date-time has shown in their timezone.
> So most of wicket devs, do that somehow like we did it here:
> https://github.com/OrienteerBAP/Orienteer/blob/master/orienteer-core/src/main/java/org/orienteer/core/component/property/date/ODateLabel.java
> But question is: does it make sense to put conversion per time-zone
> into DateConverter or that might broke something wicket
> best-practices?
>
> Thanks,
> Ilya
> ---------------------------------------------
> Orienteer(http://orienteer.org) - open source Business Application Platform
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org