tags:

views:

33

answers:

1

Dear all,

I noticed that when running GWT, it doesn't alert me of css errors such as missing/misspelled classes. Even the error console of Firefox doesn't prompt anything.

I'm skinning my web app pretty intensively, need a way to show up the css errors, any suggestion that I can try?

Thanks in advance.

+2  A: 

In order for GWT to report any CSS errors (misspelled/missing class names), you need to be including your CSSs in your GWT project via CssResource (check out the docs for usage examples, etc). If you are using UiBinder, all the CSS you declare in UiBinder's XML files are automagically converted to CssResources, so you get the benefits there too (plus, with the Google Plugin for Eclipse, you'll get nice, red underlines under any misspelled/missing class names, just as you do with any other Java errors).

Note however, that CssResource obfuscates your style names by default, so it might take a bit of work to refactor your project to take that into account (again, see the docs for a more extensive read).

Igor Klimer
Thank you very much :) Was away thus the late reply~ Thanks for including the links, they help a lot. By the way, I'm wondering about UiBinder: How is it better than the way of building the UI in a Java Swing way?
Style
There are many questions here on SO and on Google GWT Group about that - like http://stackoverflow.com/questions/2690224/what-is-the-best-approach-towards-styling-gwt-applications
Igor Klimer