Reputation: 333
While browsing through the source for Vaadin 7.6.1
i recognized, that there is no way of defining a column header based on an annotation, when using a BeanItemContainer<?>
. Is there a way around this?
Imagine a simple CRUD application with 2 entity beans Foo
and Bar
:
public class Foo {
private String interface_;
private String uag;
// Omitted getters / setters
// ...
}
public class Bar {
private String forename;
private String lastname;
// Omitted getters / setters
// ...
}
When passing this beans to a BeanItemContainer<?>
it creates magically deep inside Vaadin following column headers:
Is there a way around this and name generated properties after an Annotation
for example? Is there a reason why this is not implemented? Just for curiosity.
Upvotes: 0
Views: 132
Reputation: 76
The item properties in the BeanItemContainer are determined automatically by inspecting the getter and setter methods of the class.
As far as I know there is no way to work with annotations for that case. You can define your getters/setters the way you like to control the property naming.
Upvotes: 1