DataFX forked – @ContextResource added

Some weeks ago, Hendrik Ebbers ( shared a beta version of DataFX with me.

DataFX is a cool framework that has several components.

  • Controller : removes the direct dependency between a fxml file and it’s controller within the fxml file. It also adds contextual objects and for three kinds of contexts (Application, View and FlowView).
  • Websocket : Adds support of websockets and restful interfaces to your JavaFX application
  • Cell : Provides a simpler approach for create TableViews
  • Core : DataProvider

I played around with the Controller component. It’s really nice and easy to use, but I stumbled upon a simple thing that was a little bit annoying.

Everytime I want to use a object from the context I had to

It’s ok, but I thought it will be much cooler, if I could do in this way

So I forked DataFX in Bitbucket and started the implementation of this feature.
At the moment I can inject resources from the context with

  • a lookup in all context
  • specify a specific context from where the object should be retrieved.

I added also a feature that allows to specify the key of the object that should be injected from the context registry.

I discussed this already with Hendrik and he’s very interested in it.

0 Kudos

Leave a Reply

Your email address will not be published. Required fields are marked *