-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XStream and JavaFX Observable Collection Classes #14
Comments
I was not aware of XStreamFX at all and you're actually the first asking for JavaFX support here at XStream. However, there's currently no one here who knows JavaFX for real. So, yes, in principle it wold be possible to create a new xstream artifact with JavaFX support, but the code must be donated with proper license and valid unit tests (that's how xstream-hibernate came into existence). XStreamFX's ObservableListConverter is flawed, because it assumes it can handle any type implementing the ObservableList interface. A similar situation exists for XStream handling Collection types and XStream's CollectionConverter does not handle on purpose arbitrary Collection types (see #10). You will need an own converter for ObjectListWrapper. |
@joehni Thanks for the reply. I have experimented with creating my own ObservableListConverter as follows
And this works so long as the collection is not implicit i.e. annotated with @XStreamImplicit. Can you offer any advice as how I could handle @XStreamImplicit? |
Have you read about it in the FAQ? |
+1 I would also like this. |
I am trying to use XStream to Internalize/Externalize some classes that rely on JavaFX Properties and JavaFX Observable collections.
I have been using XStreamFX but have run into a problem with the deserialisation for ObservableListWrapper which seems to fail due is not having a no argument constructor.
I have reported the problem as an XStreamFX Issue but am wondering if XStream will add support for these commonly used FX data classes?
The text was updated successfully, but these errors were encountered: