Self-correction, the 'no-arg' is because you do not use @sprite as an
annotation, but instead on the same line as the style definition

BAD:
@sprite
.background

CORRECT:
@sprite .background



On Apr 13, 1:20 pm, dhartford <[email protected]> wrote:
> Wow, that made it crystal clear, thank you!
>
> So, using that I should be able to do all this within the uibinder
> xml, with the intent to make a background image:
>
> <ui:image field="bgImage" src="./images/app-bg.png" />
>
> <ui:style>
>  @sprite
> .background {
>         gwt-image: 'bgImage';
>         background-repeat: no-repeat;
>  }
> </ui:style>
>
> <g:HTMLPanel styleName="{style.background}" >
>
> Unfortunately (using Google Plugin) getting "could not find no-arg
> method named background in type
> com.google.gwt.resources.client.CssResource"
>
> It seems I'm very close actually.
>
> -D
>
> On Apr 13, 11:51 am, Thomas Broyer <[email protected]> wrote:
>
>
>
>
>
>
>
> > As soon as you use UiBinder, you're implicitly writing a ClientBundle, just
> > that you write XML instead of Java.
>
> > A <ui:style> generates a CssResource; and you can use a <ui:image> to
> > generate an ImageResource and a <ui:data> to generate a DataResource. You
> > can then use them from the CSS with @sprite and @url, just like any other
> > ImageResource/DataResource.
>
> > Have a look at the Mail sample, it uses both <ui:image> and <ui:data> IIRC.

-- 
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.

Reply via email to