JavaFX Scenebuilder does not see ids when FXML is in a different package than controller

I have installed netbeans with java se7 and the javafx samples are working fine. In a scripter, I can select an id for each control defined and annotated with @FXML

in my controller. nevertheless, I like my project. when I create a new package and move my FXML file there (myapp / views) and the controller stays in the root directory where it was -> myapp then it doesn't find the id in the script writer.

I am aware of the "controller class" in FXML, but since I have not moved my controller this should not change.

More specifically, when both my controller and fxml are in the "holidayapp" package, it works. moving fxml to holidayapp / views' subpackage doesn't work. The controller class remains

<AnchorPane id="AnchorPane" prefHeight="200" prefWidth="320" xmlns:fx="http://javafx.com/fxml" fx:controller="holidayapp.HolidayViewController">

      

as the HolidayViewController stays in the root package. I am not doing anything other than moving the fxml file from main package to subpackage.

I would like to see the id from holidayViewController in my script writer. Compiling and working with an fxml file in a subpackage has never been a problem.

thank

+3


source to share


2 answers


I think you may be suffering from the following problem:

https://bugs.openjdk.java.net/browse/JDK-8091793



If you think you are doing, please consider voting and / or commenting on this issue.

+2


source


The way I worked with this was for my main class to appear in the view (the one that extends the application). This gave me access to my controller classes and their variables and methods. This works for SceneBuilder 1.1.



I can only speak when using Eclipse, not NetBeans, so it might still go to zero.

0


source







All Articles