JavaFX inheritance

237 views
Skip to first unread message

andrei.io...@gmail.com

unread,
Oct 9, 2014, 10:53:11 AM10/9/14
to jfxtra...@googlegroups.com
Hello,

I have the following problem when using the 8.0-r1 version: let's say I have Class A and ClassB extends Class A.

abstract Class A {
 @FXML
 protected ComboBox box;

}

Class B extends Class A{
 @FXML
 private Node rootB

 @FXML
 protected TextField text;
}

In the FXML file, I have declared the Controller as class B: <AnchorPane fx:id="rootB" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.B">

How can I inject the FXML in class A if the controller in the fxml file is the class B.

Any help is apreciated!

Reply all
Reply to author
Forward
0 new messages