Re: ClientBundle not able to set background image

2011-11-22 Thread Julien Dramaix
> idont want to use GQuery because it generates heavy javascript. Indeed, GQuery produces extra javascript code when you use the CSS class (and only if you use it) due to the static initializer of this class. We are aware of this problem. An issue exists to track it and should be resolved soon : ht

Re: ClientBundle not able to set background image

2011-11-22 Thread Deepak Singh
Thanks Thomas. it works like a charm now. Thanks Deepak On Wed, Nov 23, 2011 at 1:14 AM, Thomas Broyer wrote: > In CSS, you use background-image: url(...);, so you should do the same in > GWT: setBackgroundImage("url(" + x + ")"). > > But in this case I'd rather use a CssResource. > > Oh, and

Re: ClientBundle not able to set background image

2011-11-22 Thread Thomas Broyer
In CSS, you use background-image: url(...);, so you should do the same in GWT: setBackgroundImage("url(" + x + ")"). But in this case I'd rather use a CssResource. Oh, and you should add an @ImageOptions(repeatStyle=Vertical) (or Both, depending on the width of your element) or you'll see other

Re: ClientBundle not able to set background image

2011-11-22 Thread Deepak Singh
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").getS

Re: ClientBundle not able to set background image

2011-11-22 Thread Andrea Boscolo
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. -- Yo

Re: ClientBundle not able to set background image

2011-11-22 Thread Deepak Singh
Sorry.Writing mistake. It is ImageResource only. On Wed, Nov 23, 2011 at 12:34 AM, darkflame wrote: > ImageSource? > Isnt it supposed to be ImageResource? > > > On Nov 22, 7:37 pm, Deepak Singh wrote: > > Hi, > > > > GWT 2.4 > > > > html contains one div as written below > > > > > style="backg

Re: ClientBundle not able to set background image

2011-11-22 Thread darkflame
ImageSource? Isnt it supposed to be ImageResource? On Nov 22, 7:37 pm, Deepak Singh wrote: > Hi, > > GWT 2.4 > > html contains one div as written below > > style="background-image:url(images/top-bar-2.png);background-repeat: > repeat-y;"> > > Now i need to replace this image through clientbundl

ClientBundle not able to set background image

2011-11-22 Thread Deepak Singh
Hi, GWT 2.4 html contains one div as written below Now i need to replace this image through clientbundle. So MyClientBundle as follows @source("images/top-bar-2.png") ImageSource topbar2(); i change my html like this and in java code i set Document.get().getElementById("topbar").getStyle(