Hi,
I've a table USER with a field called DEVICE_FK which is a foreign key reference on the table DEVICE. The field DEVICE_FK is not a mandatory and can be NULL.
I've a BoundForm which has the USER datasource as its datasource and a SelectItem with the DEVICE datasource set as OptionDataSource for the field DEVICE_FK so that a drop down box is shown to the user. The setAllowEmptyValue is set true on SelectItem so that a user can also choose an empty value from the drop down box.
This is all fine and works correctly but when the user selects the empty value from the drop down list and saves, nothing is sent to the server for the DEVICE_FK. I would have expected that a NULL value would be saved in the DEVICE_FK field for the user has CHANGED the value.
The user has now no way to remove his selection from the database.
I would appreciate your help.
I've a table USER with a field called DEVICE_FK which is a foreign key reference on the table DEVICE. The field DEVICE_FK is not a mandatory and can be NULL.
I've a BoundForm which has the USER datasource as its datasource and a SelectItem with the DEVICE datasource set as OptionDataSource for the field DEVICE_FK so that a drop down box is shown to the user. The setAllowEmptyValue is set true on SelectItem so that a user can also choose an empty value from the drop down box.
This is all fine and works correctly but when the user selects the empty value from the drop down list and saves, nothing is sent to the server for the DEVICE_FK. I would have expected that a NULL value would be saved in the DEVICE_FK field for the user has CHANGED the value.
The user has now no way to remove his selection from the database.
I would appreciate your help.
Comment