Hi, I want to implement a classic master/detail vi...
# tornadofx
a
Hi, I want to implement a classic master/detail view, where the master is a TableView of Employees and the details is a Form to edit the selected employee, I found several samples for that scenario, but what I don't like is using JavaFX properties in my domain models, I'm declaring my Employee domain model as POKO, an EmployeeModel as ItemVeiwModel, and defined all the bindings with the TableView and the Form, so my problem is that as I'm not using JavaFX properties in my domain model the table view doesn't reflect the changes in the ViewModel until I call refresh manually, and what I want is to be able to call refresh after the changes are committed to the model programmaticly, but I can't find any cleaner way to listen to model commit, without referencing the table view from the view model. Aany idea, solution, design pattern, code samples...🤔??? will be appreciated! 🙏
d
For a 'reactive' Application model you could consider using `ConflatedBroadcastChannel`s as the properties of your model.
These can wrap to JavaFX properties quite trivially as they are near-enough the same concept.
a
Thanks @darkmoon_uk for the answer, actually I don't know about
ConflatedBroadcastChannel
, can you give a simple example of using them?