1

I have a case that requires an object property's sub-property to be bound automatically to some defined property, but unbind old and rebind new on any change in the parent property; namely reverse select binding.

For illustration only (my case is different but far too complex to explain here) say i have a label that you are allowed to change for different size/color/font etc. but the text should remain the same:

StringProperty text;
ObjectProperty<Label> label;

Bindings.select(label, "text").bind(text);

Of course this is illegal since binding is possible on properties only.

Except of explicitly listen for changes, is there an out-of-the-box solution for this?

Mordechai
  • 15,437
  • 2
  • 41
  • 82

0 Answers0