Package org.kuali.rice.krad.web.bind
Class UifDateEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.kuali.rice.krad.web.bind.UifDateEditor
- All Implemented Interfaces:
PropertyEditor,Serializable
- Direct Known Subclasses:
UifCalendarEditor,UifTimestampEditor
PropertyEditor converts between date display strings and
java.sql.Date objects- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectconvertToObject(String text) Convert display text tojava.sql.Dateobject using theorg.kuali.rice.core.api.datetime.DateTimeService.This overridden method uses theorg.kuali.rice.core.api.datetime.DateTimeServiceto convert the date object to the display string.protected org.kuali.rice.core.api.datetime.DateTimeServiceGets the date time service.voidThis overridden method converts the display string to ajava.sql.Dateobject using theorg.kuali.rice.core.api.datetime.DateTimeService.protected StringverbatimYear(String date) For a given user input date, this method returns the exact string the user entered after the last slash.Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
Constructor Details
-
UifDateEditor
public UifDateEditor()
-
-
Method Details
-
getAsText
This overridden method uses theorg.kuali.rice.core.api.datetime.DateTimeServiceto convert the date object to the display string.- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport- See Also:
-
getDateTimeService
protected org.kuali.rice.core.api.datetime.DateTimeService getDateTimeService()Gets the date time service.- Returns:
- the date time service
-
setAsText
This overridden method converts the display string to ajava.sql.Dateobject using theorg.kuali.rice.core.api.datetime.DateTimeService.- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport- Throws:
IllegalArgumentException- See Also:
-
convertToObject
Convert display text tojava.sql.Dateobject using theorg.kuali.rice.core.api.datetime.DateTimeService.- Parameters:
text- the display text- Returns:
- the
java.sql.Dateobject - Throws:
IllegalArgumentException- the illegal argument exception
-
verbatimYear
For a given user input date, this method returns the exact string the user entered after the last slash. This allows the formatter to distinguish between ambiguous values such as "/06" "/6" and "/0006"- Parameters:
date-- Returns:
-