Is it possible to prevent resizing of the table columns?
3.This is the biggest problem for me. Can i add items with different types to a table?
I want to add a summary row to my table. In the “normal” rows i have icons (Embedded). And now i want to add a summary that counts all the same icons of the column and show the result as string/integer. But i don’t know how. I created a item with Integer/String, i add an embedded and set only the caption, but nothing works.
Sorry, not out of the box. This will require at least theme modifications and most likely client-side GWT modifications as well.
I don’t think it is, currently. Why would you need that, what’s the use case?
Generic component captions aren’t rendered by the Table component, they are usually only rendered when the component is placed inside some layout.
So a workaround could be that you specify the column type as a layout (CssLayout would be best), and place the Embedded icons inside that. Same for the “summary” row, just add a label inside the layout that indicates the number of icons.
I must say, I’m no guru on the data model of Vaadin, so if someone else has a better suggestion, please share.
I will try the hint with the layout cells. Maybe this can fix my other problems, too. I think about hiding the default header and adding my own header row to the table.
Do you know a method to add a style to one row only?
Ps. The idea for disabling resizing was only a personal thing. I see no use for resizing (in my case). The content width is nearly stable. And the cell content is smaller when the header caption. So there is no use to enlarge the columns and a smaller column would only hide the header caption. So i thought the best thing is to cut off this functionality.