You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DataField<V> assumes that V can be safely transformed to a String literal that makes sense for that particular type, but that's not often the case, specially when dealing with types (domain classes) for which an overridden version of toString() is not available or returns a rather cryptic value.
This design decision imposes a constraint on edited values as it's expected of them to provide a suitable toString() implementation, while at the same time requiring an external transformer (from String to V) by means of FormsFX's ValueTransformer.
It would be much better if JavaFX's StringConverter would be used instead, as it provides both sides of the equation. Retrofitting DataField with StrinfConverter can be done in a compatible way, by deprecating ValueTransformer and redirecting is String -> T transformation to an ad-hoc StringConverter.fromString. Also, a pre-instantiated StringConverter can take care of the default String conversion.
The text was updated successfully, but these errors were encountered:
DataField<V>
assumes thatV
can be safely transformed to a String literal that makes sense for that particular type, but that's not often the case, specially when dealing with types (domain classes) for which an overridden version oftoString()
is not available or returns a rather cryptic value.This design decision imposes a constraint on edited values as it's expected of them to provide a suitable
toString()
implementation, while at the same time requiring an external transformer (fromString
toV
) by means of FormsFX'sValueTransformer
.It would be much better if JavaFX's
StringConverter
would be used instead, as it provides both sides of the equation. RetrofittingDataField
withStrinfConverter
can be done in a compatible way, by deprecatingValueTransformer
and redirecting isString -> T
transformation to an ad-hocStringConverter.fromString
. Also, a pre-instantiatedStringConverter
can take care of the default String conversion.The text was updated successfully, but these errors were encountered: