Closed johandeschutter closed 5 years ago
Hi johandeschutter, thanks for your request. At the moment this is not possible but it could be added. I don't see a reason why this would not work. It's missing because we hadn't had the need for this yet and based on my experience not many people are using SetProperty and MapProperty.
I don't know when I find the time to add this feature. However, I'm happy to accept a PullRequest for this. Thinks to do are:
MapGetter
, MapSetter
...)Person.java
, PersonFX.java
and PersonImmutable.java
)field
methods similar to the code you've already posted. I've implemented the first part of this issue: You can now use Sets with the Model-Wrapper. I will add support for Maps within the next days. It works the same way
Hello,
Is possible to add to the ModelWrapper class the methods field / immutableField that accept arguments of type Set and Map .
Currently only the methods field / immutableField only accept collections of type List.
Something like this: public SetProperty field(SetGetter<M, E> getter, SetSetter<M, E> setter) {
return add(new BeanSetPropertyField<>(this::propertyWasChanged, getter,
(m, set) -> setter.accept(m, FXCollections.observableSet(set)), SimpleSetProperty::new));
}
Regards,
Johan