public abstract class DateTimeFormatInputElement extends FormatInputElement
HtmlBasedComponent.ExtraCtrl
AbstractComponent.Children
Modifier and Type | Field and Description |
---|---|
protected java.util.Locale |
_locale |
protected java.util.TimeZone |
_tzone |
_value
_zclass
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE
Constructor and Description |
---|
DateTimeFormatInputElement() |
Modifier and Type | Method and Description |
---|---|
java.util.Locale |
getLocale()
Returns the locale associated with this component,
or null if
Locales.getCurrent() is preferred. |
PropertyAccess |
getPropertyAccess(java.lang.String prop)
Returns the corresponding property access object from the given property
name, if any.
|
java.util.TimeZone |
getTimeZone()
Returns the time zone that this component belongs to, or null if the
default time zone is used.
|
java.util.Date |
getValue()
Returns the value (in Date), might be null unless a constraint stops it.
|
java.time.LocalDate |
getValueInLocalDate()
Returns the value (in LocalDate), might be null unless a constraint stops it.
|
java.time.LocalDateTime |
getValueInLocalDateTime()
Returns the value (in LocalDateTime), might be null unless a constraint stops it.
|
java.time.LocalTime |
getValueInLocalTime()
Returns the value (in LocalTime), might be null unless a constraint stops it.
|
java.time.ZonedDateTime |
getValueInZonedDateTime()
Returns the value (in ZonedDateTime), might be null unless a constraint stops it.
|
protected java.time.ZoneId |
getZoneId() |
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing
tags and children.
|
void |
setConstraint(Constraint constr)
Sets the constraint.
|
void |
setLocale(java.util.Locale locale)
Sets the locale used to identify the format of this component.
|
void |
setLocale(java.lang.String locale)
Sets the locale used to identify the format of this component.
|
void |
setTimeZone(java.lang.String id)
Sets the time zone that this component belongs to, or null if
the default time zone is used.
|
void |
setTimeZone(java.util.TimeZone tzone)
Sets the time zone that this component belongs to, or null if
the default time zone is used.
|
void |
setValue(java.util.Date value)
Sets the value (in Date).
|
void |
setValueInLocalDate(java.time.LocalDate value)
Sets the value (in LocalDate).
|
void |
setValueInLocalDateTime(java.time.LocalDateTime value)
Sets the value (in LocalDateTime).
|
void |
setValueInLocalTime(java.time.LocalTime value)
Sets the value (in LocalTime).
|
void |
setValueInZonedDateTime(java.time.ZonedDateTime value)
Sets the value (in ZonedDateTime).
|
protected java.util.Date |
toDate(java.time.LocalDate value) |
protected java.util.Date |
toDate(java.time.LocalDateTime value) |
protected java.util.Date |
toDate(java.time.LocalTime value) |
protected java.time.ZonedDateTime |
toZonedDateTime(java.util.Date value) |
getFormat, getRealFormat, setFormat
checkUserError, clearErrorMessage, clearErrorMessage, clone, coerceFromString, coerceToString, getCols, getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, getInstant, getMaxlength, getName, getPlaceholder, getRawText, getRawValue, getTargetValue, getText, getType, isChildable, isDisabled, isInplace, isInstant, isMultiline, isReadonly, isValid, marshall, onWrongValue, select, service, setCols, setConstraint, setDisabled, setErrorboxIconSclass, setErrorboxSclass, setErrorMessage, setInplace, setInputAttributes, setInputAttributes, setInsertedText, setInstant, setMaxlength, setName, setPlaceholder, setRawValue, setReadonly, setSelectedText, setSelectionRange, setText, setValueDirectly, showCustomError, unmarshall, validate
getContext, getCtrlKeys, getPopup, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, invalidatePartial, isInitialized, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
invalidatePartial
public java.util.Locale getLocale()
Locales.getCurrent()
is preferred.public void setLocale(java.util.Locale locale)
Default: null (i.e., Locales.getCurrent()
, the current locale
is assumed)
public void setLocale(java.lang.String locale)
Default: null (i.e., Locales.getCurrent()
, the current locale
is assumed)
public java.util.TimeZone getTimeZone()
The default time zone is determined by TimeZones.getCurrent()
.
public void setTimeZone(java.util.TimeZone tzone)
The default time zone is determined by TimeZones.getCurrent()
.
public void setTimeZone(java.lang.String id)
The default time zone is determined by TimeZones.getCurrent()
.
id
- the time zone's ID, such as "America/Los_Angeles".
The time zone will be retrieved by calling TimeZone.getTimeZone(id).protected java.time.ZoneId getZoneId()
public void setConstraint(Constraint constr)
Constrainted
Default: null (means no constraint all all).
setConstraint
in interface Constrainted
setConstraint
in class InputElement
public java.util.Date getValue() throws WrongValueException
WrongValueException
- if user entered a wrong valuepublic void setValue(java.util.Date value) throws WrongValueException
value
- the date to be assigned to this component.TimeZones.getCurrent()
), so it is easier
to work with other libraries, such as SQL.
Dates
has a set of utilities to simplify the task.WrongValueException
- if value is wrongpublic java.time.ZonedDateTime getValueInZonedDateTime() throws WrongValueException
WrongValueException
- if user entered a wrong valuepublic void setValueInZonedDateTime(java.time.ZonedDateTime value) throws WrongValueException
value
- the date to be assigned to this component.TimeZones.getCurrent()
), so it is easier
to work with other libraries, such as SQL.
Dates
has a set of utilities to simplify the task.WrongValueException
- if value is wrongpublic java.time.LocalDateTime getValueInLocalDateTime() throws WrongValueException
WrongValueException
- if user entered a wrong valuepublic void setValueInLocalDateTime(java.time.LocalDateTime value) throws WrongValueException
value
- the date to be assigned to this component.TimeZones.getCurrent()
), so it is easier
to work with other libraries, such as SQL.
Dates
has a set of utilities to simplify the task.WrongValueException
- if value is wrongpublic java.time.LocalDate getValueInLocalDate() throws WrongValueException
WrongValueException
- if user entered a wrong valuepublic void setValueInLocalDate(java.time.LocalDate value) throws WrongValueException
value
- the date to be assigned to this component.TimeZones.getCurrent()
), so it is easier
to work with other libraries, such as SQL.
Dates
has a set of utilities to simplify the task.WrongValueException
- if value is wrongpublic java.time.LocalTime getValueInLocalTime() throws WrongValueException
WrongValueException
- if user entered a wrong valuepublic void setValueInLocalTime(java.time.LocalTime value) throws WrongValueException
value
- the date to be assigned to this component.TimeZones.getCurrent()
), so it is easier
to work with other libraries, such as SQL.
Dates
has a set of utilities to simplify the task.WrongValueException
- if value is wrongprotected java.time.ZonedDateTime toZonedDateTime(java.util.Date value)
protected java.util.Date toDate(java.time.LocalDateTime value)
protected java.util.Date toDate(java.time.LocalDate value)
protected java.util.Date toDate(java.time.LocalTime value)
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
renderProperties
in class FormatInputElement
java.io.IOException
public PropertyAccess getPropertyAccess(java.lang.String prop)
ComponentCtrl
getPropertyAccess
in interface ComponentCtrl
getPropertyAccess
in class FormatInputElement
prop
- the name of the propertyCopyright © 2005-2021 Potix Corporation. All Rights Reserved.