Binding a ComboBox gives "Unable to build a field of type ComboBox

I have this code: [code]
BeanItem bi = new BeanItem(newAction);
FieldGroup fieldGroup = new BeanFieldGroup(PrAction.class);
fieldGroup.setItemDataSource(bi);
fieldGroup.setBuffered(true);
ComboBox actionTypeField = fieldGroup.buildAndBind(“action type”, “actionType”, ComboBox.class);

[/code]which gives me this:[code]
Caused by: com.vaadin.data.fieldgroup.FieldGroup$BindException: Unable to build a field of type com.vaadin.ui.ComboBox for editing com.jimb.snailmanager.entity.ActionType
at com.vaadin.data.fieldgroup.FieldGroup.build(FieldGroup.java:995)
at com.vaadin.data.fieldgroup.FieldGroup.buildAndBind(FieldGroup.java:967)
at com.jimb.snailfarmmanager.PrActionForm.(PrActionForm.java:60)
at com.jimb.snailfarmmanager.ProductionAreaParterresPanel$2.buttonClick(ProductionAreaParterresPanel.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:508)
… 32 more

[/code] I am trying to find something in the docs regarding fieldgroups and selects but I cannot. I managed to make it work with textfields and Dates using the post
here
. Any help for the Combo would be very welcome.

regards,

jim

Ok, I found a way to overcome this using
bind
instead of
buildAndBind
:

ComboBox cb = new ComboBox("Action type", beans);
cb.setItemCaptionPropertyId("dscr");
cb.setFilteringMode(FilteringMode.CONTAINS);
cb.setImmediate(true);

fieldGroup.bind(cb, "actionType");
form.addComponent(cb);