I am developing a vaadin application and now I can not solve the following problem.
I have an object model:
public class MyModel {
private long id;
private Date dValidoAl;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Date getDValidoAl() {
return dValidoAl;
}
public void setDValidoAl(Date dValidoAl) {
this.dValidoAl = dValidoAl;
}
}
Now I am trying to bind this object to the BeanItemContainerfollowing:
Table table = new Table();
BeanItemContainer<MyModel> container = new BeanItemContainer<MyModel>(MyModel.class);
table.setContainerDataSource(container);
Object[] visibleProperties = new Object[] { "id", "dValidoAl" };
String[] columnsHeader = new String[] { "Id", "Inizio Validitร " };
table.setVisibleColumns(visibleProperties);
table.setColumnHeaders(columnsHeader);
but I get this error:
Identifiers must exist in the container or as a generated column, id is missing: dValidoAl
Where am I doing wrong?
source
share