Package org.kuali.rice.krad.web.bind
Class UifBooleanEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.kuali.rice.krad.web.bind.UifBooleanEditor
- All Implemented Interfaces:
PropertyEditor,Serializable
PropertyEditor for booleans supports y/n which the spring version does not
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
Constructor Details
-
UifBooleanEditor
public UifBooleanEditor()
-
-
Method Details
-
getAsText
Gets the property value as a string suitable for presentation to a human to edit- Specified by:
getAsTextin interfacePropertyEditor- Overrides:
getAsTextin classPropertyEditorSupport- Returns:
- The property value as a string suitable for presentation
to a human to edit.
Returns String "true" or "false".
Returns "null" is the value can't be expressed as a string.
If a non-null value is returned, then the PropertyEditor should be prepared to parse that string back in setAsText().
-
setAsText
Sets the property value by parsing a given StringThe text is compared against the configured acceptable string values for boolean true and false
- Specified by:
setAsTextin interfacePropertyEditor- Overrides:
setAsTextin classPropertyEditorSupport- Parameters:
text- The string to be parsed.- Throws:
IllegalArgumentException- if text does not contain either true or false
-