Package org.kuali.rice.krad.web.bind
Class UifDateTimeEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.kuali.rice.krad.web.bind.UifDateTimeEditor
- All Implemented Interfaces:
PropertyEditor,Serializable
PropertyEditor converts between timestamp display strings and @{DateTime} objects.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.kuali.rice.core.api.datetime.DateTimeServiceReturns theDateTimeService.voidThis implementation converts theDatedisplay string to aDateTimeobject using theDateTimeService.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
-
UifDateTimeEditor
public UifDateTimeEditor()
-
-
Method Details
-
getAsText
This implementation uses the
DateTimeServiceto convert theDateTimeobject to aTimestampdisplay string.- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport
-
setAsText
This implementation converts theDatedisplay string to aDateTimeobject using theDateTimeService.- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport- Throws:
IllegalArgumentException
-
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- the date to process- Returns:
- the year
-
getDateTimeService
protected org.kuali.rice.core.api.datetime.DateTimeService getDateTimeService()Returns theDateTimeService.- Returns:
- the
DateTimeService
-