title: JAVAFX - share object between controllers
body: <p>Please how to share object User between Controllers? I have a TabPanelController. In initialization send to other controllers Data with object User. Its OK, but I cant acces to this object before stage shown. </p>
  
  <p>Its possible acces to Stage in initialize method in controller, when controller is loaded before Stage? Or how handle onWindowShow in loader (When windows show, object User was filled)? </p>
  
  <pre><code>    @FXML
      private ActionController panelActionController;
      @FXML
      private StoreController panelStoreController;
      @FXML
      private ProfilesController panelProfilesController;
      @FXML
      private UsersController panelUsersController;
  
      @FXML
      @Override
      public void initialize(URL url, ResourceBundle resourceBundle) {
      Platform.runLater(new Runnable() {
          @Override
          public void run() {
              menuUserInfo.setText("           " + loggedInUser.getName() + " " +
                      loggedInUser.getForname() + " (" + loggedInUser.getLogin() + ")");
              menuUserInfo.setUserData(loggedInUser);
              panelActionController.setLoggedUser(loggedInUser);
              panelStoreController.setLoggedUser(loggedInUser);
              panelProfilesController.setLoggedUser(loggedInUser);
              panelUsersController.setLoggedUser(loggedInUser);
          }
      });
      }
  </code></pre>
  
  <p>In panelActionController</p>
  
  <pre><code>@Override
  public void initialize(URL url, ResourceBundle resourceBundle) {
      System.out.println(loggedInUser); // NULL..
  }
  </code></pre>
  
  <p>When i press any button in stage, loggedUser is not null. But i need set buttons, textfields by user role (Admin, User) during initialization.</p>