public class MustDateField extends MustTextField
additionalTagFragments, capitalization, className, contentChangeListener, controlLength, enterAction, maxColumns, maxlength, registerFlag, required, size
context, editable, enabled, lastEditability, lastVisibility, name, nonstandardPanel, nonstandardPosition, sessionData, toolTipText, visible
Constructor and Description |
---|
MustDateField(SessionData sessionData)
Constructs a new date input field.
|
Modifier and Type | Method and Description |
---|---|
void |
format()
Formats the date string according to the locale.
|
protected java.lang.String |
getCreateTagElement() |
java.lang.String |
getSqlCompareString()
Returns the component's value as a string to compare in SQL where clauses.
|
java.sql.Date |
getSqlDate()
Returns the component's value as an SQL date.
|
boolean |
isContentValid()
Returns true if the component's value is valid.
|
boolean |
isInRange(double pastYearsLimit,
double futureYearsLimit)
Returns true if the edited date is in the range as specified.
|
boolean |
isValid()
Returns true the text field is valid.
|
void |
setDate(java.sql.Date newDate)
Sets the date.
|
void |
setDateAsUserInput(java.sql.Date newDate)
Sets the date as if it was entered by user to force modified flag for data saving.
|
void |
setTodayValue()
Sets the value of the date field to today.
|
void |
setTodayValue(java.util.Locale locale)
Sets the value of the date field to today.
|
void |
setTodayValueAsUserInput()
Sets the value of the date field to today as if it was entered by user to force modified flag for data saving.
|
addContentChangeListener, addMoreCreationAspects, buildRemoteView, fetchValuesFromRequest, getApplication, getText, getTextOrNullIfEmpty, hasFocus, isFilled, isModified, isRequirementUnfulfilled, perform, setApplication, setCapitalization, setColumns, setEditable, setEnterAction, setOnChoice, setRegisterFlag, setRequired, setText, setTextAsUserInput, setValues
destroy
beginAction, endAction, free, getContext, getName, getTranslation, isEnabled, isVisible, register, requestFocusInWindow, resetLastStatus, selectAll, setEnabled, setToolTipText, setVisible
public MustDateField(SessionData sessionData)
protected java.lang.String getCreateTagElement()
getCreateTagElement
in class MustTextField
public void setDate(java.sql.Date newDate)
newDate
- the new value of the date fieldpublic void setDateAsUserInput(java.sql.Date newDate)
newText
- the new textpublic void setTodayValue()
public void setTodayValueAsUserInput()
public void setTodayValue(java.util.Locale locale)
public boolean isContentValid()
public boolean isValid()
isValid
in class MustTextField
public void format()
public boolean isInRange(double pastYearsLimit, double futureYearsLimit)
pastYearsLimit
- the limit in years this date may be in the pastfutureYearsLimit
- the limit in years this date may be in the futurepublic java.sql.Date getSqlDate()
public java.lang.String getSqlCompareString()
Copyright 1998-2023 Christoph Mueller, Kaerntner Str. 56, D-70469 Stuttgart, Germany, https://www.perpus.de