Sunday, July 29, 2012

How do you over ride a css definition in GWT using CSSResource?


Been working on my first GWT app and have come across this problem where I need to override a CSS in an existing widget. Specifically to remove the Grid Selection border around a cell when a row has focus. From my research I gather I need to perform several steps. I've traced this css down to


So I create this in a new css file (lets say "mods.css").

--- mods.css
@external dataGridSelectedRowCell

.dataGridSelectedRowCell {

At this point I have to include it in a RssResource.

public interface NewGridStyle extends {
public String dataGridSelectedRowCell();


In my code I use the following lines

DataGrid.Resources resources = GWT.create(NewGridStyle.class);
dg = new DataGrid<Plan>(PAGE_SIZE, resources, getDataProvider()

When I try to compile my app, I get the following error:

Rebind result 'net.tofusoft.GWT.NewGridStyle' must be a class

So what did I do wrong?

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment