SQLContainer used with editable Table and ComboBox field


I am trying the SQLContainer (simple oracle table) as data source for a table. Following the tutorial for SQLContainer, I was able to set it up and get the table show up with data. I make the table editable and it works fine with fields showing up as TextFields.

I want to make one of the fields a combo box in the editable table. I did override of the DefaultFieldFactory for the table and for one of the columns I return a combobox. This makes the combo box show up in the editable table but the value is not selected.

Just for testing, I removed the use of the SQLContainer and add a Long container property to table - manually populated 1 to 30 Long value integer items into table container, now it works with FieldFactory override and shows proper values in the combobox in editable table. But when I switch to SQLContainer as data source, combobox stops showing current data value in the field. The column mapped to combo box is a NUMBER column type in oracle and there is data in the column as confirmed by text field in basic editable table

What am I missing to do so that combo box shows correct value of the field in combo box in the editable table?


I figured it out. In the combo box I needed to add the items as BigDecimal. This was in the SQL Container manual

When using Oracle database most or all of the numeric types are converted to
java.math.BigDecimal by the Oracle JDBC Driver.
• This is a feature of how Oracle DB and the Oracle JDBC Driver handles data types.