Groups
Groups
Sign in
Groups
Groups
GWT Users
Conversations
About
Send feedback
Help
CellTable - how to put HTML into a column
664 views
Skip to first unread message
Magnus
unread,
Aug 21, 2012, 3:17:54 AM
8/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Hello,
I would like to put raw HTML code into a single column of a CellTable.
What is the easiest way to do this?
Thank you
Magnus
Jens
unread,
Aug 21, 2012, 3:26:40 AM
8/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Thats what SafeHtmlCell is for.
-- J.
Magnus
unread,
Aug 21, 2012, 3:33:38 AM
8/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Am Dienstag, 21. August 2012 09:26:40 UTC+2 schrieb Jens:
Thats what SafeHtmlCell is for.
Thanks, but how does this work, i. e. how do I have to modify my code?
TextColumn<Car> col_Color = new TextColumn<Car>()
{
@Override
public String getValue(Car obj)
{
String t = "<font color='#FF0000'>Test</font>";
return (t);
}
};
Jens
unread,
Aug 21, 2012, 3:43:59 AM
8/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Column<Car, SafeHtml> carCol = new Column<Car, SafeHtml>(new SafeHtmlCell()) {
public SafeHtml getValue(Car car) {
//return your SafeHtml. Use SafeHtmlTemplates/SafeHtmlUtils to build your SafeHtml.
}
}
Magnus
unread,
Aug 21, 2012, 3:52:51 AM
8/21/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to google-we...@googlegroups.com
Thanks, this works fine!
Magnus
Reply all
Reply to author
Forward
0 new messages