I'm trying to include controller(SelectedIssueController) in my main layout (main.fxml). But I get the following error:
Can not set lt.mypackage.controllers.SelectedIssueController field lt.mypackage.controllers.MainController.selectedIssueController to javafx.scene.layout.VBox
Line in main.fxml:
<fx:include fx:id="selectedIssueController" source="controllers/selectedissue.fxml" />
My selectedissue.fxml:
<VBox xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1" fx:controller="lt.mypackage.controllers.SelectedIssueController" fillWidth="false" SplitPane.resizableWithParent="false">
<children>
.....
.....
</children>
</VBox>
Line in MainController:
@FXML
private SelectedIssueController selectedIssueController;
As I understand it injects VBox object now, but I need SelectedIssueController. What is wrong with my current implementation?