Tried this also. But still image is not displayed.
If i use GQuery and does this one
$("#topbar").css(CSS.BACKGROUND_IMAGE.with(UriValue.url(HomePageClientBundle.INSTANCE.topbar2().getSafeUri().asString())));
then image gets displayed.
But using gwt
Document.get().getElementById("topbar").getStyle().
setBackgroundImage(HomePageClientBundle.INSTANCE.topbar2().getSafeUri().asString());
does not display the image.
idont want to use GQuery because it generates heavy javascript.
Thanks
Deepak
On Wed, Nov 23, 2011 at 12:44 AM, Andrea Boscolo <[email protected]>wrote:
> Should be ImageResource yes, and I also think the setBackgroundImage(...)
> method accepts a String, not an ImageResource.
>
> In the 2.4 release you should use
>
> ****...setBackgroundImage(**
> clientbundle.topbar2().getSafeUri().asString());
>
> cause in 2.4 the getUrl() in the ImageResource is deprecated.
>
> --
> 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/-/-NpRnD2DgMAJ.
>
> 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.
>
--
Deepak Singh
--
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.