How does one use a background image in conjuction with GSS + ClientBundle?

According to how I interpreted the documentation [1], I tried this:

[inside MyBundle extends ClientBundle]:

@Source("bg.png")
ImageResource gridBackground();


[inside app.gss]:

.myClass {
  background-image: resourceUrl("gridBackground");
}


But I get this:

[ERROR] Error in /.../classes/com/...app.gss[line: 240 column: 35]: Could 
not find no-arg method named gridBackground in type com....
_LayoutUiBinderImpl_GenBundle

I also tried using DataResource instead of ImageResource (documentation 
mentions DataResource--typo?) but I get the same error.

If I put bg.png on a static folder, e.g. under webapp folder, 
background-image: url("bg.png") works as expected but I want to use the 
optimizations that ClientBundle/CssResource give.

What am I doing wrong?


[1] http://www.gwtproject.org/doc/latest/DevGuideGssVsCss.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to