I don't know why, but you're right, the
@FXMLApplicationContext annotation doesn't seem to work.
Hendrik, is there a reason for this?
I've been successful by just treating the application context as a singleton and using it like so:
@ViewController(value = "../fxml/MainLayout.fxml", title = "Main Layout")
public class MainLayoutController {
private ApplicationContext applicationContext = ApplicationContext.getInstance();
Object theObjectINeed;
@PostConstruct
public void postConstruct() {
theObjectINeed = applicationContext.getRegisteredObject("theKeyForTheObjectINeed");
}
}