Hi he some piece of code, i need to ad two component (like two Labels for example with different style) in one cell of a classic table (Vaadin 7.xx).
attached an image to show hoe need to do.
Someone can help us?
private ArticleCartTable buildShoppingCartComponents() throws SQLException {
shoppingChartTable = new ArticleCartTable(........) {
@Override
protected void refreshFooter() {
super.refreshFooter();
try {
...GETRECORD REQUEST...
}
} catch (Exception e) {
WebAppNotifier.notify(e);
}
}
};
shoppingChartTable.setCaption("Cart");
shoppingChartTable.setWidth("100%");
shoppingChartTable.setPageLength(0);
shoppingChartTable.setIcon(FontAwesome.SHOPPING_CART);
return shoppingChartTable;
}
.....
public class ArticleCartTable extends Table {
..... for complete table call this method (article name column, see in image attached)
private void addArticleNameColumn() {
addGeneratedColumn(ProjectEnum.ARTICLE, (source, itemId, columnId) -> {
ShoppingCart sc = (ShoppingCart) itemId;
LabelCustom labelCustom = new LabelCustom(sc.getIdArticle().getName(), false);
labelCustom.setWidth("100%");
return labelCustom;
});
setColumnExpandRatio(ProjectEnum.ARTICLE, 1);
}
Thanks