valueProperty
A Property whose value is of type V?
(i.e. its value may be null).
NOTE. This is a generic type, such as Property<String?>
when V is String
. NOT an OptionalStringProperty. This is annoying, because the JVM's generic type system is limited. For example, we can't use ObservableOptionalString.isNullOrBlank with Property<String?>
. (The JVM's method's signature uses Property<*>
, so there is no way to differentiate based on the value's type). FYI, this is part of the reason why we need the ungodly mess in glok's auto-generated boilerplate
package!
To get around this, you could create a SimpleOptionalStringProperty and bind it to valueProperty. SimpleOptionalStringProperty isn't a generic type, so the JVM's limitations don't apply.