Hello,1 person found this helpful
I have similar expectations for JAXB to handle JavaFX properties.
In the meantime, I am looking towards the javafx.beans.property.adapter API.
It encapsulates a JavaBean property from a POJO to a JavaFX property so that any change on the JavaFX property reflects in the POJO.
So I keep using my POJO for marshaling/unmarshaling with JAXB, but I use the adapter on properties to be used with JavaFX.
It looks like this:
Person person = new Person(); // with getter and setter for attribute "lastName"
JavaBeanStringProperty lastNameProperty = JavaBeanStringPropertyBuilder.create().bean(person).name("lastName").build();
Thanks for the tip about javafx.beans.property.adapter. I'd overlooked that.
Is anything actually happening on the JAXB front?
Steve, I was wondering if you finally succeed to do what you wanted. Because, like you, I use JAXB and I wanted to manage JavaFX Properties in order to bind them.
I tried Jean-Michel way, by using javafx.beans.property.adapter and if you want to use binding between JavaBean Property and JavaFX Property the Bean must be more than just getter, setter .. the Bean need Bound Properties. Unfortunately JAXB do not use those Properties.
I hope I mistaken but I don't think so.
Does anyone have a solution to this problem ?