Class CmsDateField
- java.lang.Object
-
- com.vaadin.server.AbstractClientConnector
-
- com.vaadin.ui.AbstractComponent
-
- com.vaadin.ui.AbstractField<T>
-
- com.vaadin.ui.AbstractDateField<java.time.LocalDateTime,com.vaadin.shared.ui.datefield.DateTimeResolution>
-
- com.vaadin.ui.AbstractLocalDateTimeField
-
- com.vaadin.ui.DateTimeField
-
- org.opencms.ui.components.CmsDateField
-
- All Implemented Interfaces:
com.vaadin.data.HasValue<java.time.LocalDateTime>
,com.vaadin.event.ContextClickEvent.ContextClickNotifier
,com.vaadin.event.FieldEvents.BlurNotifier
,com.vaadin.event.FieldEvents.FocusNotifier
,com.vaadin.event.MethodEventSource
,com.vaadin.server.ClientConnector
,com.vaadin.server.Sizeable
,com.vaadin.shared.Connector
,com.vaadin.ui.Component
,com.vaadin.ui.Component.Focusable
,java.io.Serializable
public class CmsDateField extends com.vaadin.ui.DateTimeField
Convenience subclass of PopupDateField which comes preconfigured with a resolution and validation error message.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
-
-
Constructor Summary
Constructors Constructor Description CmsDateField()
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.time.LocalDateTime
dateToLocalDateTime(java.util.Date date)
Converts aDate
object to aLocalDateTime
object.java.util.Date
getDate()
Convenience method returning the field value converted to date.static java.util.Date
localDateTimeToDate(java.time.LocalDateTime local)
Converts aLocalDateTime
object to aDate
object.void
setDate(java.util.Date date)
Convenience method to set the LocalDateTime field value to the given date.-
Methods inherited from class com.vaadin.ui.DateTimeField
getAssistiveText, getPlaceholder, getState, getState, isTextFieldEnabled, setAssistiveText, setPlaceholder, setTextFieldEnabled
-
Methods inherited from class com.vaadin.ui.AbstractLocalDateTimeField
adjustToResolution, buildDate, convertFromDate, convertToDate, formatDate, getDatePart, getRangeValidator, toType
-
Methods inherited from class com.vaadin.ui.AbstractDateField
addBlurListener, addFocusListener, afterDate, beforeClientResponse, convertFromDateString, convertToDateString, doSetValue, getAssistiveLabel, getDateFormat, getDateOutOfRangeMessage, getDateStyle, getDateStyles, getDefaultValidator, getDefaultValue, getParseErrorMessage, getRangeEnd, getRangeStart, getResolution, getValue, getZoneId, handleUnparsableDateString, isLenient, isPreventInvalidInput, isShowISOWeekNumbers, readDesign, reconstructDateFromFields, setAssistiveLabel, setDateFormat, setDateOutOfRangeMessage, setDateStyle, setDaylightSavingTimeRange, setDefaultValue, setLenient, setLocale, setParseErrorMessage, setPreventInvalidInput, setRangeEnd, setRangeStart, setResolution, setShowISOWeekNumbers, setValue, setZoneId, writeDesign
-
Methods inherited from class com.vaadin.ui.AbstractField
addValueChangeListener, createValueChange, focus, getCustomAttributes, getTabIndex, isDifferentValue, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setTabIndex, setValue
-
Methods inherited from class com.vaadin.ui.AbstractComponent
addContextClickListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefined
-
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstate
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisible
-
-
-
-
Constructor Detail
-
CmsDateField
public CmsDateField()
Creates a new instance.-
Method Detail
-
dateToLocalDateTime
public static java.time.LocalDateTime dateToLocalDateTime(java.util.Date date)
Converts aDate
object to aLocalDateTime
object.- Parameters:
date
- the date- Returns:
- the local date time
-
localDateTimeToDate
public static java.util.Date localDateTimeToDate(java.time.LocalDateTime local)
Converts aLocalDateTime
object to aDate
object.- Parameters:
local
- the local date time- Returns:
- the date
-
getDate
public java.util.Date getDate()
Convenience method returning the field value converted to date.- Returns:
- the date
-
setDate
public void setDate(java.util.Date date)
Convenience method to set the LocalDateTime field value to the given date.- Parameters:
date
- the date to set
-
-
-
-