I am aware that JavaFX has the include tag that allows FXML to be imbedded in a larger FXML and gives you access to the child controller with the use of an fx:id. However, I am looking for functionality that more closely mirrors the behavior of Java. I have a BasicController class with it's own FXML. However, there are cases where the features in this basic FXML are not enough. In this case I extend the BasicController class, modify the basic FXML and save it as something new. For this example we can say I have a BasicController class that is extended by AdvancedController. However, I only have one the new advanced.fxml which is nothing more than the basic.fxml with more features. The issue here is if I want to update BasicController and basic.fxml to add a new common feature, those features are not fully inherited due to advanced.fxml not extending basic.fxml. The AdvancedController has all the new functionality due to inheritance but the FXML side is lost. Now, I know I can use the include tag. But that gets ugly. I am now passing in the model to the AdvancedController just to have it relay the information to the child controller. I think there is really a need for an inherit tag. With this tag the FXML components of the parent controller will be instantiated. This should be fairly straight forward to implement. You would basically stand up an instance of the parent controller and pass it in the child marked with the inherit tag. It would then stand up instantiating the FXML fields of the parent controller. This would allow for FXML to mirror the extends behavior of JAVA. So then when I want to add some common feature I only need to update the BasicController and the basic.fxml. As, long as I didn't hard code sizing of advanced.fxml it will get the functionality without needing to be updated.
I was going to create a ticket but the link didn't work for me... thoughts?