FXML Patterns / best practices
greg.x.brown at oracle.com
Mon Feb 27 10:21:01 PST 2012
> I would like to second what Werner wrote. In my programs, since the controller is created, I can't inject dependencies and instead wind up wrapping them with an adapter that I call a "module" (makes sense for my app at least).
FYI - in JavaFX 2.1, you can use a controller factory to get more control over the controller instantiation process. The ability to set the controller directly on the loader would simply be a third option.
More information about the openjfx-dev