[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Fwd: Subject: JavaFX dependency injection
From:       Nitin Malik <nmalik1 () gmail ! com>
Date:       2015-11-25 15:29:48
Message-ID: CA+4A7GC08cmhBRvF+gVsvfrQz22yerA0sG3J-1tyKSc6CDZKOg () mail ! gmail ! com
[Download RAW message or body]

+ 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.

Nitin


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


Nitin,

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.

Eugene

From: Nitin Malik <nmalik1@gmail.com>
Date: Tuesday, November 24, 2015 at 8:03 PM
To: Eugene Ryzhikov <eryzhikov@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
<https://bitbucket.org/gluon-oss/ignite/src/c85197b33852b78b1a519dca2b1424314cb899fb/s \
pring/src/main/java/com/gluonhq/ignite/spring/SpringContext.java?at=default&fileviewer=file-view-default#SpringContext.java-89>,
 the lookup is by class, not Spring bean. Are there plans to add support for
this?

Regards,
Nitin


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

> 
> 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
> 
> 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic