Tuesday, March 6, 2012

How to add custom styles to custom cells

Hi -

I have a custom cell definition that I want to add a custom style definition (.quiet) for. In this case, it's a cell that goes into a cell table. What I have done (and is NOT working) is the following:

interface CellTableResources extends CellTable.Resources {

@Source({CellTable.Style.DEFAULT_CSS, "DesktopServiceTable.css"})

CellTableStyle cellTableStyle();

}

interface CellTableStyle extends CellTable.Style {

String quiet();

}

I added a .quiet{} rule to my DesktopServiceTable.css

Then, the render() method of my cell class uses the "quiet" class: @SafeHtmlTemplates.Template("<strong>{0}</strong><br/><em class=\"quiet\">Updated: {1}</em>")

The class name is on the em element in the DOM (within the td of the table), but there is no style associated with it - it's almost like it wasn't "injected" or something.


Any ideas?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/BLlhV8o2rH4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment