org.kuali.rice.krad.web.bind
Class UifDateEditor

java.lang.Object
  extended by java.beans.PropertyEditorSupport
      extended by org.kuali.rice.krad.web.bind.UifDateEditor
All Implemented Interfaces:
PropertyEditor
Direct Known Subclasses:
UifTimestampEditor

public class UifDateEditor
extends PropertyEditorSupport

This PropertyEditor converts between date display strings and java.sql.Date objects.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
UifDateEditor()
           
 
Method Summary
protected  Object convertToObject(String text)
          Convert display text to java.sql.Date object using the org.kuali.rice.core.api.datetime.DateTimeService.
 String getAsText()
          This overridden method uses the org.kuali.rice.core.api.datetime.DateTimeService to convert the date object to the display string.
protected  DateTimeService getDateTimeService()
          Gets the date time service.
 void setAsText(String text)
          This overridden method converts the display string to a java.sql.Date object using the org.kuali.rice.core.api.datetime.DateTimeService.
 
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UifDateEditor

public UifDateEditor()
Method Detail

getAsText

public String getAsText()
This overridden method uses the org.kuali.rice.core.api.datetime.DateTimeService to convert the date object to the display string.

Specified by:
getAsText in interface PropertyEditor
Overrides:
getAsText in class PropertyEditorSupport
See Also:
PropertyEditorSupport.getAsText()

getDateTimeService

protected DateTimeService getDateTimeService()
Gets the date time service.

Returns:
the date time service

setAsText

public void setAsText(String text)
               throws IllegalArgumentException
This overridden method converts the display string to a java.sql.Date object using the org.kuali.rice.core.api.datetime.DateTimeService.

Specified by:
setAsText in interface PropertyEditor
Overrides:
setAsText in class PropertyEditorSupport
Throws:
IllegalArgumentException
See Also:
PropertyEditorSupport.setAsText(java.lang.String)

convertToObject

protected Object convertToObject(String text)
                          throws IllegalArgumentException
Convert display text to java.sql.Date object using the org.kuali.rice.core.api.datetime.DateTimeService.

Parameters:
text - the display text
Returns:
the java.sql.Date object
Throws:
IllegalArgumentException - the illegal argument exception


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.