Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Column Grid
I create one beancontainer from my object
private BeanItemContainer<PendenciaMovimentacaoVO> pendenciaContainer = new BeanItemContainer<PendenciaMovimentacaoVO>(PendenciaMovimentacaoVO.class, new ArrayList<PendenciaMovimentacaoVO>());
so when I set my grid
gridServicos.setContainerDataSource(pendenciaContainer);
vaadin wiil create my columns by my PendenciaMovimentacaoVO properts names..
so if I have in my PendenciaMovimentacaoVO
private String name;
private String born;
the grid will be create with 2 columns one name and other born. but if I need to change this names, I need to use
gridServicos.getColumn("born").setHeaderCaption("Where you born?")
if I use this PendenciaMovimentacaoVO in others views I wiil need to does this more than one.
So It`s possible to use annotations or another way to define in my PendenciaMovimentacaoVO the real names of columns?
something like this
@GridColumn("Where you born?")
private String born;
tks
If u are going to create a grid, with the same set of properties, same BeanContainer, why dont u just create a factory method.. something like:
public Grid buildPendenciaMovimentacaoVOGrid(BeanItemContainer<PendenciaMovimentacaoVO> container) {
...
gridServicos.getColumn("born").setHeaderCaption("Where you born?")
return gridServicos;
}