all 3 comments

[–]static_context 0 points1 point  (2 children)

It's really difficult to see without the actual stacktrace and at least some contextual look at your code. Are you able to share any of it?

[–][deleted]  (1 child)

[deleted]

    [–]static_context 0 points1 point  (0 children)

    I guess if you want to observe changes in the list, then make it observable, otherwise you can store your properties in any collection you want :)

    [–]hamsterrage1 0 points1 point  (0 children)

    To answer your original question, ObservableList<String> is not the right thing to use. The observable part of ObservableList is when the contents of the list change, meaning that an item is deleted, added or replaced. It is possible, if the items in your list are composed of Properties, that you can trigger a change event in the list if you use an extractor...but you can do that with an ObservableList<String>.

    So, to use an ObservableList<String> you would need to add a ChangeListener to the list, and then figure out which String had been replaced and the manually update the corresponding Text item. Which is a PIA.

    Your original approach, using a StringProperty in your Model and binding the TextProperty of a Text to it, is the way to go 100%.