Fwd: Subject: JavaFX dependency injection

Nitin Malik nmalik1 at gmail.com
Wed Nov 25 15:29:48 UTC 2015

+ mailgroup

I dont think its non-standard. We have solved this by creating a factory
that holds the bean id (and does a lookup when callback is invoked).
Alternatively, to make the solution Spring-free, the factory can hold the
controller object.

Both these approaches work, but seem like a work around due to the
restrictive API.

I would like to get inputs from the Oracle folks on this.


---------- Forwarded message ----------
From: Eugene Ryzhikov <eryzhikov at gmail.com>
Date: Tue, Nov 24, 2015 at 8:22 PM
Subject: Re: Subject: JavaFX dependency injection
To: Nitin Malik <nmalik1 at gmail.com>
Cc: openjfx-dev <openjfx-dev-bounces at openjdk.java.net>


Ignite makes use of standard JavaFX API, which provides only controller
class as a parameter to a controller factory.
I imagine you're proposing that access to bean id would be given in some
non-standard way?

In any case, Ignite is an open source framework, and any type of
contributions are welcome.
If you have an idea which can add to existing functionality, please send us
a pull request. We’ll be glad to discuss it.


From: Nitin Malik <nmalik1 at gmail.com>
Date: Tuesday, November 24, 2015 at 8:03 PM
To: Eugene Ryzhikov <eryzhikov at gmail.com>
Subject: Re: Subject: JavaFX dependency injection

Hi Eugene,

This look promising, but I dont think it addresses the multiple controller
scenario (#1) I outlined in my original mail.

Specifically looking at this line
the lookup is by class, not Spring bean. Are there plans to add support for


On Tue, Nov 24, 2015 at 4:55 PM, Eugene Ryzhikov <eryzhikov at gmail.com>

> At Gluon we’ve open-sourced the framework called Ignite just for this
> purpose.
> With this library, developers can use popular dependency injection
> frameworks in their JavaFX applications, including inside their FXML
> controllers. Gluon Ignite creates a common abstraction over several popular
> dependency injection frameworks (currently Guice, Spring, and Dagger). Full
> support of JSR-330 makes using dependency injection in JavaFX applications
> trivial.
> For more information take a look at our blog at
> http://gluonhq.com/announcing-gluon-ignite-easy-javafx-dependency-injection/
> Eugene

More information about the openjfx-dev mailing list