Select component doesn't show value (Form with databinding)

Hi,

I’m new with Vaadin and I have a problem with Select component used in a Form with databinding

I have the following entity:

public class Book {

private Publisher publisher;

public Publisher getPublisher() {
return publisher;
}

public void setPublisher(Publisher publisher) {
this.publisher = publisher;
}
}

To populate the form I do:

Book book=dao.getBoot(…);
BeanItem book=new BeanItem(bookl);
form.setItemDataSource(item,formProperties);

I do the following to populate the select:

List publishers=dao.getPublishers();
BeanItemContainer container=new BeanItemContainer(Publisher.class, publishers);
Select select = new Select(“Publisher”,container);

After setItemDataSource I get the correct value from the Select field (field.getValue()). BUT the value is NOT shown in the input field of the Select.
When I select a value from the dropdown the value is shown…

Can anybody of you give me a hint what’s wrong???

TIA
Martin

O.k. the solution is simple. The entity (in this case Publisher) has to implement equals().