Class ZonedToLocalDateTimeModel
- java.lang.Object
-
- org.apache.wicket.extensions.markup.html.form.datetime.ZonedToLocalDateTimeModel
-
- All Implemented Interfaces:
Serializable,org.apache.wicket.model.IDetachable,org.apache.wicket.model.IModel<LocalDateTime>,org.apache.wicket.util.io.IClusterable
public class ZonedToLocalDateTimeModel extends Object implements org.apache.wicket.model.IModel<LocalDateTime>
- Author:
- svenmeier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ZonedToLocalDateTimeModel(org.apache.wicket.model.IModel<ZonedDateTime> model)Map the givenZonedDateTimeto aLocalDateTimein the client's time zone.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddetach()protected ZoneIdgetClientTimeZone()What is theZoneIdof the client.LocalDateTimegetObject()protected ZoneIdgetTargetTimeZone()What is theZoneIdof createdZonedDateTimeobjects.voidsetObject(LocalDateTime dateTime)
-
-
-
Constructor Detail
-
ZonedToLocalDateTimeModel
public ZonedToLocalDateTimeModel(org.apache.wicket.model.IModel<ZonedDateTime> model)
Map the givenZonedDateTimeto aLocalDateTimein the client's time zone.- Parameters:
model- zoned date time
-
-
Method Detail
-
detach
public void detach()
- Specified by:
detachin interfaceorg.apache.wicket.model.IDetachable- Specified by:
detachin interfaceorg.apache.wicket.model.IModel<LocalDateTime>
-
getClientTimeZone
protected ZoneId getClientTimeZone()
What is theZoneIdof the client.- See Also:
RequestCycleSettings.getGatherExtendedBrowserInfo(),ZoneId.systemDefault()
-
getTargetTimeZone
protected ZoneId getTargetTimeZone()
What is theZoneIdof createdZonedDateTimeobjects.
-
getObject
public LocalDateTime getObject()
- Specified by:
getObjectin interfaceorg.apache.wicket.model.IModel<LocalDateTime>
-
setObject
public void setObject(LocalDateTime dateTime)
- Specified by:
setObjectin interfaceorg.apache.wicket.model.IModel<LocalDateTime>
-
-