title: JavaFX ComboBox - Display text but return ID on selection
body: <p>I have a Database table with airports, each airport has a name and an ID.</p>
  
  <p>In JavaFX I have a form, with a <code>ComboBox</code>, the combobox needs to display all the airport names and when the form is submitted it needs to insert the ID of the airport into the database (not its name).</p>
  
  <p>But I'm not really figuring out what the solution is.</p>
  
  <p>I have a </p>
  
  <pre><code>ObservableList vliegveldenList = FXCollections.observableArrayList();
  ObservableList vliegveldenIDList = FXCollections.observableArrayList();
  </code></pre>
  
  <p>Database connection to fill the <code>ComboBox</code></p>
  
  <pre><code>ResultSet rs = Project_Fasten_Your_Seatbelt.conn.createStatement()
   .executeQuery("SELECT vliegveldnaam, vliegveld_id FROM fys_project.vliegvelden;");
  while (rs.next()) {
      vliegveldenList.add(rs.getString(1));
      vliegveldenIDList.add(rs.getString(2));
  }
  </code></pre>
  
  <p>Fills the combobox:</p>
  
  <pre><code>vliegveldHerkomst.setValue("Luchthaven ...");
  vliegveldHerkomst.setItems(vliegveldenList); 
  </code></pre>
  
  <p>And this is added to the database when button is pressed:</p>
  
  <pre><code>String registratieValue = registratieNmrTxt.getText();
  String vluchtValue = vluchtNrmTxt.getText();
  String vliegveldValue = (String) vliegveldHerkomst.getSelectionModel().getSelectedItem();
  String bestemmingValue = (String) vliegveldBestemming.getSelectionModel().getSelectedItem(); 
  String gevondenValue = (String) vliegveldGevonden.getSelectionModel().getSelectedItem();
  LocalDate dGevondenValue = datumGevondenDate.getValue();
  LocalDate dVluchtValue = datumVluchtDate.getValue();
  String gewichtValue = gewichtBagageTxt.getText();
  String kleurenValue = (String) kleuren.getSelectionModel().getSelectedItem();
  String kofferValue = (String) kofferMerken.getSelectionModel().getSelectedItem();
  String opmerkingValue = opmerkingArea.getText();
  
  //Data gevonden bagage invoeren
  Project_Fasten_Your_Seatbelt.conn.createStatement().executeUpdate(
          "INSERT INTO gevondenbagage "
          + "(registratienummer, datumgevonden, datumaangemeld, vliegveldherkomst, "
          + "vliegveldbestemming, vliegveldgevonden, vluchtnummer, vluchtdatum, gewicht, "
          + "kleur, merk, `speciale opmerkingen`, userid)"
          + "VALUES ('" + registratieValue + "','" + dGevondenValue + "','" + today.format(localDate) + "','"
          + vliegveldValue + "','" + bestemmingValue + "','" + gevondenValue + "','"
          + vluchtValue + "','" + dVluchtValue + "','" + gewichtValue + "','"
          + kleurenValue + "','" + kofferValue + "','" + opmerkingValue + "','"
          + Project_Fasten_Your_Seatbelt.getUserId() + "')");
  </code></pre>
  
  <p>This all works okay, but instead of the name of the airport I want to set the ID for the airport for <code>vliegveldValue</code>.</p>
  
  <p>How do I do this?</p>