FXML backwards compatibility issue

Daniel Zwolenski zonski at gmail.com
Wed Jun 27 06:10:22 PDT 2012

In my FXML Controllers I have the following member variable:

    private ResourceBundle resources;

After loading my Controller via FXML, I would then set this manually so my
Controllers could access the resources needed.

In version JFX 2.1 and lower this works fine but in version 2.2 it looks
like JFX has decided it has control over this variable now? As a result JFX
attempts to inject the resources, but it fails because the variable is
private and not marked with @FXML. My application is very broken and won't
start without me going back and changing this everywhere.

I also have another problem with imports. Since there was no ComboBox in
JFX, I created my own. Now one exists in JFX and has the same name as mine.
In code my imports have been added via my IDE and by luck my ComboBox is
imported explicitly (i.e. not using the * wildcard). In my FXML however, I
have added these by hand and my imports are using wildcard imports for both
my 'control' package and the JFX 'control' package. End result: the JFX
ComboBox is now the one being referenced and so I get class cast and no
such method errors at runtime.

I'm pretty much cactus here right? Auto-update is going to mean the users
will get 2.2 when it is released (do we have a date for this?). I have to
go back and "fix" all this "broken" code, on a project I no longer work on
for a client no longer paying me?

More information about the openjfx-dev mailing list