title: Passing Parameters JavaFX FXML
body: <p>How can I pass parameters to a secondary window in javafx? Is there a way to communicate with the corresponding controller?</p>
  
  <p>For example:
  The user chooses a customer from a <code>TableView</code> and a new window is opened, showing the customer's info.</p>
  
  <pre><code>Stage newStage = new Stage();
  try 
  {
      AnchorPane page = (AnchorPane) FXMLLoader.load(HectorGestion.class.getResource(fxmlResource));
      Scene scene = new Scene(page);
      newStage.setScene(scene);
      newStage.setTitle(windowTitle);
      newStage.setResizable(isResizable);
      if(showRightAway) 
      {
          newStage.show();
      }
  }
  </code></pre>
  
  <p><code>newStage</code> would be the new window. The problem is, I can't find a way to tell the controller where to look for the customer's info (by passing the id as parameter).</p>
  
  <p>Any ideas?</p>