Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Populate TableView with ObservableMap(Problem to dinamically update the ObservableMap and TableView)
Populate TableView with ObservableMap [message #1823424] Thu, 26 March 2020 11:51 Go to next message
Marco Maisano is currently offline Marco MaisanoFriend
Messages: 22
Registered: March 2020
Junior Member

I have a ConcurrentHashMap that takes dinamically data from a JMS tail.

Then I need to populate a TableView with the data of the ConcurrentMap.

My idea is to use an ObservableMap that is populated by the ConcurrentHashMap.

1) How can I control if the data are dinamically passed from the Concurrent to the Observed?

My solution is:
ObservableMap<String, SystemTarget> entriesTarget= FXCollections.observableMap(targetMap);

2) How can I control if the rows number is changed in relation to the ObservableMap update?

My solution:
ObservableList<SystemTarget> obsList = FXCollections.observableArrayList(entriesTarget.values());


I can see the rows, but they are not changed......

What am I doing wrong?

Re: Populate TableView with ObservableMap [message #1823447 is a reply to message #1823424] Thu, 26 March 2020 19:32 Go to previous message
Cole Markham is currently offline Cole MarkhamFriend
Messages: 150
Registered: July 2009
Location: College Station, TX
Senior Member

ObservableList and ObservableMap don't monitor the collection you pass to them. You would need to propagate any changes from the original list/map.
Previous Topic:Java 11 e4 application :IllegalAccessError
Next Topic:Simple e4 fx application wont start up
Goto Forum:

Current Time: Fri Jul 19 13:28:34 GMT 2024

Powered by FUDForum. Page generated in 0.03394 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top