Open yrcs opened 5 years ago
Found a solution?
Found a solution? I am using mvvmfx, it can also work with Spring Boot. https://github.com/sialcasa/mvvmFX
Since there was no answer for this for a long time: you can set either the controller or a controller factory in the FXMLLoader instance, but then you omit it in the .fxml file. As I saw, the controllerFactory is set in the view, so if you use this library, you don't have to set it in the .fxml
As the title say, there is the only one way to set the view's controller via "fx:controller" in fxml file and no way can set the controller via the pure java code.