title: JavaFX PropertyValueFactory bind TableView with other controls
body: <p><strong>Hi everynone,</strong></p>
  
  <p>I just have a simple question on a correct way database binding implementation.</p>
  
  <p>I got a TableView populated by a database. The database create "Inputs" javaFX POJO objects and pass it to the Tableview.</p>
  
  <p>On a first need I have to link an 'ID' to the TableView data's. The only way I succeed that was by adding an hidden column. But is there a better way to achieve that (TableView &lt;> Id Database binding) without creating an hidden column ?</p>
  
  <p>A second need is to display an Inputs' data that is a LONG VARCHAR and I wan't to display it on a TextArea behind the TableView. This TexArea data should be binded to the TableView's "Inputs" JavaFX POJO objects for add/update/save actions.</p>
  
  <p>Is there a correct way to achieve that without using hidden columns and binding theses columns to other controls or is this the only way to do that ?</p>
  
  <p>If it is the only way is there a possiblity to remove the hidden TableColumns from the TableView menu set by this method ? "tableView.setTableMenuButtonVisible(true)"</p>
  
  <p>A solution could be like this code below but I wanted to know if it is a good/best practice and if it is a common implementation or not and if there is another way without using an Hidden column to bind two controls:</p>
  
  <pre><code>inputsTable.setOnMouseClicked(new EventHandler&lt;MouseEvent&gt;() {
                @Override
                  public void handle(MouseEvent mouseEvent) {
                    if (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {
                      if (mouseEvent.getClickCount() == 1) {
                          Inputs input= inputsTable.getSelectionModel().getSelectedItem();
                         if(input != null){  
                             colNote.textProperty().unbindBidirectional(input.noteProperty());
                             colNote.setText("");
                          }
                         colNote.textProperty().bindBidirectional(input.noteProperty());
  
                    }
                  }
                }
              });
  </code></pre>
  
  <p>Here is the view to help understanding:
  <img src="https://i.stack.imgur.com/FCC2L.png" alt="Main UI">
  Thank you for reading me, if you need some sample code I can add some...</p>
  
  <p><strong>Thanks All, Regards.</strong></p>
  
  <p><strong>[EDIT] I think it is a false problem in fact</strong>; when I pass Inputs'POJO to the Tableview the Objects have the ID set so I just need to do a <code>inputsTable.getSelectionModel().getSelectedItem().getId()</code> to retrieve the ID. Or another way would be binding an Observable Integer that would be accessible by the whole application and setted in the <code>inputsTable.getSelectionModel().selectedItemProperty().addListener(new ChangeListener&lt;Inputs&gt;() {....}</code> event... <strong>Thanks all, Regards.</strong></p>