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.
Format text in table, e.g. making it fat
Hi guys,
is there any way to make text fat (e.g. with HTML-tags) in a table if I declared the datatype as a String like this:
analysisTable.addContainerProperty("Sentence", String.class, null);
Or is my only change to change the rowtype to Label and use the html possibilities there?
The reason why I don't just use Labels in my table is that I'm afraid that one label for each row might decrease the performance.
Can anyone give me feedback on this? I guess more people might have my question, but sadly I couldn't find any answer while researching on it.
I'm a bit of in a hurry, if someone could help me with his / her experience I would be very happy :)
Tobias Demuth: Use a Table.CellStyleGenerator for that.
My Problem:
For example I have a column named "Sentence", now I want that every word in this sentence that has more than 8 characters becomes fat.
I'm not that good in CSS, but I guess that I can only give one css class for the whole Sentence-column, not for single words in it, or am I wrong?
I have now tried to solve this with Labels (setting them to XHTML content) and giving all words that have more than 8 characters <b> word </b> tags, but they have some mysterious bugs on my screen (I added the whole String with html-tags later with Label.setValue(String)). Only a few rows get rendered, than the table creation simply stops.
Can anyone please help me here?
Here you can see the problem:
http://dl.dropbox.com/u/40355908/check.png
The developers of VAADIN have an example on their table-tutorialwebsite, in which they do kind of exactly the same.
https://vaadin.com/book/-/page/components.table.html
They add a label with XHTML code and then it works for them, at least in their example
Manuel Stein:
Tobias Demuth: Use a Table.CellStyleGenerator for that.
My Problem:
For example I have a column named "Sentence", now I want that every word in this sentence that has more than 8 characters becomes fat.
I'm not that good in CSS, but I guess that I can only give one css class for the whole Sentence-column, not for single words in it, or am I wrong?
I have now tried to solve this with Labels (setting them to XHTML content) and giving all words that have more than 8 characters <b> word </b> tags, but they have some mysterious bugs on my screen (I added the whole String with html-tags later with Label.setValue(String)). Only a few rows get rendered, than the table creation simply stops.
Can anyone please help me here?
Can you give us your code, it will help to find the problem.