0

I have a root layout that contains a main menu and a toolbar. Embedded in this layout is another layout containing my other controls (table view, list boxes, etc.). I have a controller class for each layout.

In the controller for the 'embedded' layout, I have the table view updated from a database in the 'initialize' method. BUT-- I have a button in my root layout that I use to add items to the database. After this occurs, I need to update the table view with the item that was just added to the database.

My problem is that since I don't have access to the controls referenced in the embedded layout's controller, I'm not sure how to update a control that belongs to a different controller.

I've seen other posts here regarding using a single controller for multiple layouts. Is this best practice? Or is there a different approach I should take?

Bryan Green
  • 441
  • 3
  • 18
  • Do http://stackoverflow.com/questions/27965401/passing-parameters-between-two-javafx-controllers or http://stackoverflow.com/questions/14187963/passing-parameters-javafx-fxml/14190310#14190310 answer your question? – James_D May 03 '15 at 05:43
  • Ooooh, looks promising! Thanks, I'll give it a go and see what happens... – Bryan Green May 03 '15 at 05:51

0 Answers0