On Thursday, January 13, 2011 11:41:47 PM UTC+1, zixzigma wrote:
>
> still would appreciate some tips on using images defined in the
> clientbundle,
> inside CSS
>
> <ui:with field='res' type='package.of.Resources'/>
>
> can we do something similar to this ?
>
> .homeIcon {
> background-image:'res.homeIcon';
>
> }
No. AFAICT, you'd have to define a CssResource in your Resources bundle
defining classes (using @sprite or @url) for each ImageResource /
DataResource you want to be able to use that way.
If it's about a DataResource's getUrl(), there might be a way using a
singleton instance of your ClientBundle (or at least an instance accessible
through static methods and fields):
<ui:style>
@eval homeIconUrl package.of.Resources.INSTANCE.homeIcon().getUrl();
.homeIcon {
background-image: homeIconUrl;
}
</ui:style>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.