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
Tobias17
(Tobias Demuth)
May 2, 2012, 4:05pm
2
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 word 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
Eric13
(Eric Roberge)
May 3, 2012, 1:03am
5
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 word 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.