title: JavaFX include fxml in fxml without controller
body: <p>I'm programming an application with javafx.
  It's a "multiscreen" application with a mainmenu from where I can switch my scene.</p>
  
  <p>My scenes are defined in different fxml files.</p>
  
  <p>Because I try to use the mvc pattern I don't set the controller in the fxml files, I use setController on the FXMLloader.</p>
  
  <p>Everything is working fine but I have the mainmenu and all its functions for the onActions in separate controller and in separate fxml file.</p>
  
  <p>I've tried it with </p>
  
  <pre><code>&lt;fx:include source="Menubar.fxml"/&gt;
  </code></pre>
  
  <p>and created a controller for the fxml file, when I set the controller in the fxml file I can't compile the source. How do I set the controller for the included fxml file?</p>
  
  <p>startpage.fxml gets its controller "Startpage" with</p>
  
  <pre><code>FXMLLoader loader = new FXMLLoader(getClass().getResource("../fxml/startpage.fxml"));
          loader.setController(new Startpage(m));
          Pane mainPane = loader.load();
  </code></pre>
  
  <p><code>startpage.fxml</code> includes <code>menubar.fxml</code>, how to set a controller for the menubar controls now? Or how to include the menubarController easily in every other controller?</p>