How to create a JavaFX Tableview with editable rows of different types?
<p>I'm trying to create a tableview with JvafaFX that will display a list of camera parameters. Some of these parameters are editable and some are not, some are constrained by a list of values others are free text entry. I have setup the table to display the parameters in a key, value type display where one column is used for the name of the parameter and the other the value. </p>

<p>The values for the table are set using an observable list which is generated from the background data model:</p>

<pre><code>propertyNamesColumn.setCellValueFactory(cellData -&gt; cellData.getValue().getName());
propertyValuesColumn.setCellValueFactory(cellData -&gt; cellData.getValue().getValue());
</code></pre>

<p>The model also contains whether the property should be editable and what possible values it may contain, these are currently stored in two different fields (I'm not sure if this is the best way) so there are 4 fields in total. </p>

<p>When setting up the rows of the table I want to make those that should be editable (according to the values in the model), editable by either a choicebox containing the values from the possible values list or a text field.</p>

<p>However I'm not sure what I need to implement to make this happen, I have tried extending the ChoiceBoxTableCell class to add in this logic but the table cells never even become editable.</p>

<p>I'm fairly sure that either an extension of the choicebox cell type or a cell factory should be able to do this, but I don't know how.</p>

<p>Thanks for any help.</p>