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.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Display red star sign in a column
Dear All:
How could I display a red star sign with a value in a column cell of a table?
Please refer the attachment.
Thanks a lot.
Vince
Last updated on Apr, 25th 2012
You need to use a column whose type is a Label instead of plain String. Then you can add a Label component in XHTML mode to the column and style the red asterisk using CSS.
Instead of
table.addContainerProperty("column name", String.class, null);
use
table.addContainerProperty("column name", Label.class, null);
And for the Label:
new Label("<span class=\"red\">*</span>Project No", Label.CONTENT_XHTML);
.red {
color: red;
}
Last updated on
+1
You cannot reply to this thread.