A DESCRIPTION OF THE PROBLEM :
Currently FXMLLoader injects fields in the controller using reflection. In this way you can't use a controller proxy because the @FXML annotated fields aren't directly in the proxy and they are only in the target object.
A way to solve this issue is by using setter methods during the FXMLLoader fields injection like in PropertyValueFactory. To solve this issue without modifying the JavaFX library you can only rewrite the entire FXMLLoader.
I would like to help you implementing this feature, so please contact me if you decide to work on it.
Currently FXMLLoader injects fields in the controller using reflection. In this way you can't use a controller proxy because the @FXML annotated fields aren't directly in the proxy and they are only in the target object.
A way to solve this issue is by using setter methods during the FXMLLoader fields injection like in PropertyValueFactory. To solve this issue without modifying the JavaFX library you can only rewrite the entire FXMLLoader.
I would like to help you implementing this feature, so please contact me if you decide to work on it.
- relates to
-
JDK-8092163 Allow Controller Component injection via setter methods (@FXML)
- Open