I have a JavaFx project with two controllers and two fxml documents. The main document has the ability to launch the secondary document and make it viewable to the user. This new secondary document should display an "id" value that is retrieved from a table in the main controller. However, I cannot access the variables from the main controller in my secondary controller. I can retrieve the value that I need from the table by using the following code.
Customer person = customerTable.getSelectionModel().getSelectedItem();
System.out.println(person.getRID());
I need to be able to access the id from my secondary controller. How do I need to go about doing this? Thanks in advance.