Form data population question

Scenario:
I am using a com.vaadin.ui.Form that is supported by an ItemDataSource. The “ItemDataSource” is retrieved from a SQLContainer using a “TableQuery”.

My database table consists of a row identifier, some data columns and a foreign key identifier from a parent table.

In the edit mode when I retrieve the data, the form is populated correctly. However in the add mode I do the following

Object itemId = myContainer.addItem();
Item item = myContainer.getItem(itemId);
form.setItemDataSource(item);

Is there any way for me to to populate the foreign key data for this form prior to displaying the form?

I tried populating the data before displaying the form and recieved the UnsupportedOperationException() on com.vaadin.addon.sqlcontainer.RowItem class.


    item.addItemProperty("FK_COLUMN_NAME", new ObjectProperty(
					valueToBeSet));

Any guidance is appreciated.

Thanks,
Arijith