title: javafx: attach ChoiceBox to a TableCell on a TableColumn during Edit
body: <p>The code below are instance methods of an object.</p>
  
  <pre><code>private StringProperty buySell;
  
  // getters
  public String getBuySell(){
      return this.buySell.get();
  }
  
  // return Property Object
  public StringProperty buySellProperty(){
      return this.buySell;
  }
  
  // setters
  public void setBuySell(String buySell){
      this.buySell.set(buySell);
  }
  </code></pre>
  
  <p>In my <code>Controller</code> class, I have created a <code>TableColumn</code> for <code>buySell</code> string property with the code below.</p>
  
  <p>When I created a transaction, there will be a new row on the <code>tableView</code>. However, I want to be <strong>able to edit the buySell tableCell</strong>. </p>
  
  <p><strong>Question:</strong> How can I embed a <code>choicebox</code> with values <code>buy</code>, <code>sell</code> within the <code>setOnEdit</code> function such that when I double click on the cell, it will give me a choicebox ?</p>
  
  <p>I have my <code>choicebox</code> code below but I have no idea how to combine these things together. </p>
  
  <pre><code>    ChoiceBox&lt;BuySell&gt; buySellBox = new ChoiceBox&lt;&gt;();
      buySellBox.getItems().addAll("Buy", "Sell");
  </code></pre>
  
  <p><strong>Update:</strong> Problem is still unresolved. However, by following the answer in this <a href="https://stackoverflow.com/questions/21860019/javafx-create-combobox-tablecell">post</a>, this is what I have got so far. After creating an object, a table row is created but when I click onto the table cell <code>Buy</code> to <strong>edit</strong>, nothing happens (I was expecting a drop down choice box to appear and let me re-select my choice). </p>
  
  <p>My table is editable, since I am able to edit tableCell using <code>Volume</code> using the code above.  </p>
  
  <p>Added in the images below to show that I am able to edit the <code>Volume</code> tableCell , but not the <code>buySell</code> tableCell, whenever I click on it. </p>
  
  <p><a href="https://i.stack.imgur.com/ybg8F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ybg8F.png" alt="enter image description here"></a></p>