title: JavaFX controller injection does not work
body: <p>I have two <code>fxml</code> files. I connect them with an <code>include</code> statement:</p>
  
  <p>The "main" <code>fxml</code>file looks like that:
      </p>
  
  <pre><code>&lt;?import javafx.geometry.*?&gt;
  // ...
  
  &lt;BorderPane prefHeight="962" prefWidth="1280" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.MyMainController"&gt;
      &lt;center&gt;
          &lt;SplitPane dividerPositions="0.63" BorderPane.alignment="CENTER"&gt;
              &lt;items&gt;
                  &lt;fx:include source="AnotherFile.fxml" /&gt;
                  // ...
              &lt;/items&gt;
          &lt;/SplitPane&gt;
      &lt;/center&gt;
      &lt;top&gt;
          // ...
      &lt;/top&gt;
  &lt;/BorderPane&gt;
  </code></pre>
  
  <p>And the second one (= "AnotherFile.fxml") like that:
      </p>
  
  <pre><code>&lt;?import java.lang.*?&gt;
  // ...
  
  &lt;SplitPane dividerPositions="0.15" orientation="VERTICAL" prefHeight="400.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/8.0.40" xmlns:fx="http://javafx.com/fxml/1"&gt;
      &lt;items&gt;
          // ...
          &lt;Label fx:id="oneOfMyLabels" text="myText" GridPane.columnIndex="2" GridPane.rowIndex="1" /&gt;
      &lt;/items&gt;
  &lt;/SplitPane&gt;
  </code></pre>
  
  <p>Now, I am using injections in the "main"-controller <code>application.MyMainController</code>:</p>
  
  <pre><code>@FXML
  private Label oneOfMyLabels;
  </code></pre>
  
  <p>If I run the controller I get a <code>java.lang.NullPointerException</code> exception, respectively a <code>java.lang.reflect.InvocationTargetException</code> one. In debugging mode I found out, that the injected <code>Label</code> is <code>null</code>!</p>
  
  <p>Now, my question:
  Can't reach the <code>MyMainController</code> from the "main fxml file" the components of the included fxml file?? Do I have to use an own controller on each fxml file, if it is included or not?!</p>
  
  <p>Thanks for your help!!</p>