open class CustomBooleanEditor : PropertyEditorSupport
Property editor for Boolean/boolean properties.
This is not meant to be used as system PropertyEditor but rather as locale-specific Boolean editor within custom controller code, to parse UI-caused boolean strings into boolean properties of beans and check them in the UI form.
In web MVC code, this editor will typically be registered with binder.registerCustomEditor
calls.
Author
Juergen Hoeller
Since
10.06.2003
See Also
org.springframework.validation.DataBinder#registerCustomEditor
CustomBooleanEditor(allowEmpty: Boolean)
Create a new CustomBooleanEditor instance, with "true"/"on"/"yes" and "false"/"off"/"no" as recognized String values. The "allowEmpty" parameter states if an empty String should be allowed for parsing, i.e. get interpreted as null value. Else, an IllegalArgumentException gets thrown in that case. CustomBooleanEditor(trueString: String, falseString: String, allowEmpty: Boolean)
Create a new CustomBooleanEditor instance, with configurable String values for true and false. The "allowEmpty" parameter states if an empty String should be allowed for parsing, i.e. get interpreted as null value. Else, an IllegalArgumentException gets thrown in that case. |
static val VALUE_0: String |
|
static val VALUE_1: String |
|
static val VALUE_FALSE: String |
|
static val VALUE_NO: String |
|
static val VALUE_OFF: String |
|
static val VALUE_ON: String |
|
static val VALUE_TRUE: String |
|
static val VALUE_YES: String |
open fun getAsText(): String |
|
open fun setAsText(text: String): Unit |