Class UifDateTimeEditor

java.lang.Object
java.beans.PropertyEditorSupport
org.kuali.rice.krad.web.bind.UifDateTimeEditor
All Implemented Interfaces:
PropertyEditor, Serializable

public class UifDateTimeEditor extends PropertyEditorSupport implements Serializable
PropertyEditor converts between timestamp display strings and @{DateTime} objects.
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • UifDateTimeEditor

      public UifDateTimeEditor()
  • Method Details

    • getAsText

      public String getAsText()

      This implementation uses the DateTimeService to convert the DateTime object to a Timestamp display string.

      Specified by:
      getAsText in interface PropertyEditor
      Overrides:
      getAsText in class PropertyEditorSupport
    • setAsText

      public void setAsText(String text) throws IllegalArgumentException
      This implementation converts the Date display string to a DateTime object using the DateTimeService.
      Specified by:
      setAsText in interface PropertyEditor
      Overrides:
      setAsText in class PropertyEditorSupport
      Throws:
      IllegalArgumentException
    • verbatimYear

      protected String verbatimYear(String date)
      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 the DateTimeService.
      Returns:
      the DateTimeService