public abstract class AbstractDateField<T> extends AbstractTextField<T>
Modifier and Type | Field and Description |
---|---|
protected boolean |
containsTime |
static String |
copyright |
protected boolean |
dateFormatError |
protected String |
datePattern |
protected DateTimeFormatter |
dateTimeFormatter |
protected T |
dateValue |
autoCapitalize, labelPlaceholder, maxLength, replaceBadUnicodeCharacters, size, stringValue
accessor, bulkCheckboxName, bulkChecked, colSpan, COPYRIGHT, EDITABLE_FIELD_CSS_CLASS, elementsConfiguration, enabled, errors, fieldCssClass, forceNewRow, FORM_LABEL_CSS_CLASS, help, href, id, INPUT_CONTAINER_CSS_CLASS, inputName, insertable, label, logger, mode, required, STATIC_VALUE_CSS_CLASS, title, updatable
Constructor and Description |
---|
AbstractDateField(PropertyAccessor accessor,
Mode mode) |
AbstractDateField(PropertyAccessor accessor,
Mode mode,
String prefix) |
Modifier and Type | Method and Description |
---|---|
protected abstract DateTime |
fromDate(T dateValue) |
String |
getDatePattern() |
DateTimeFormatter |
getDateTimeFormatter() |
T |
getValue() |
protected T |
maybeConvertValue(Object value) |
void |
readFrom(KeyValueAccessor keyValueAccessor) |
void |
readFromObject(Object obj) |
void |
readFromRequest(HttpServletRequest req) |
void |
setDateTimeFormatter(DateTimeFormatter dateTimeFormatter) |
void |
setStringValue(String stringValue) |
void |
setValue(T dateValue) |
protected abstract T |
toDate(DateTime dateTime) |
protected abstract T |
toDate(Number millisSince1970) |
protected void |
updateStringValue() |
boolean |
validate() |
void |
valueToXhtmlEdit(XhtmlBuffer xb) |
void |
writeToObject(Object obj) |
getMaxLength, getSize, getStringValue, isAutoCapitalize, isLabelPlaceholder, isReplaceBadUnicodeCharacters, labelToXhtml, setAutoCapitalize, setLabelPlaceholder, setMaxLength, setReplaceBadUnicodeCharacters, setSize, valueToXhtml, valueToXhtmlPreview, valueToXhtmlView
closeVisibleField, errorsToXhtml, getColSpan, getDisplayValue, getErrors, getFieldCssClass, getHelp, getHref, getId, getInputName, getLabel, getMode, getPropertyAccessor, getText, getTitle, hasRequiredFields, helpToXhtml, isBlank, isEnabled, isForceNewRow, isInsertable, isReadOnly, isRequired, isUpdatable, isValid, openVisibleField, setColSpan, setEnabled, setErrors, setFieldCssClass, setForceNewRow, setHelp, setHref, setId, setInputName, setInsertable, setLabel, setRequired, setTitle, setUpdatable, toXhtml, writeTo, writeToObject, writeToObject
public static final String copyright
protected final String datePattern
protected DateTimeFormatter dateTimeFormatter
protected final boolean containsTime
protected T dateValue
protected boolean dateFormatError
public AbstractDateField(PropertyAccessor accessor, Mode mode)
public AbstractDateField(PropertyAccessor accessor, Mode mode, String prefix)
public void readFromRequest(HttpServletRequest req)
readFromRequest
in interface Element
readFromRequest
in class AbstractField<T>
public boolean validate()
validate
in interface Element
validate
in class AbstractTextField<T>
public void readFromObject(Object obj)
readFromObject
in interface Element
readFromObject
in class AbstractField<T>
protected void updateStringValue()
public void writeToObject(Object obj)
public void valueToXhtmlEdit(XhtmlBuffer xb)
valueToXhtmlEdit
in class AbstractTextField<T>
public void setStringValue(String stringValue)
setStringValue
in interface Field<T>
setStringValue
in class AbstractTextField<T>
protected T maybeConvertValue(Object value)
maybeConvertValue
in class AbstractField<T>
public void readFrom(KeyValueAccessor keyValueAccessor)
readFrom
in interface FormElement
readFrom
in class AbstractField<T>
public T getValue()
public void setValue(T dateValue)
public String getDatePattern()
public DateTimeFormatter getDateTimeFormatter()
public void setDateTimeFormatter(DateTimeFormatter dateTimeFormatter)