i gor it working by referencing the Resources-class from my Composite class like this:
@UiField(provided=true) final Resources resources; and in contructor i did: this.resources = GWT.create(Resources.class); this.resources.css().ensureInjected(); however isn't this supposed to work also with uibinder only (i mean without calling ensureInjected() from somewhere)? thank you! On Thu, Aug 11, 2011 at 1:01 PM, Daniel Guggi <daniel.gu...@gmail.com>wrote: > hi, > > i'm trying to use a css-clientbundle and uibinder like this: > > *Resources.java* > package gwtapp.client.resources; > > import com.google.gwt.resources.client.ClientBundle; > import com.google.gwt.resources.client.CssResource; > > public interface Resources extends ClientBundle { > > @Source("Style.css") > Style css(); > > public interface Style extends CssResource { > String header(); > } > } > > *Style.css* > .header { > background-color: red; > color: green; > } > > *in uiBinder-template i do:* > <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> > <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" > xmlns:g="urn:import:com.google.gwt.user.client.ui"> > > <ui:with field="resources" type="gwtapp.client.resources.Resources" /> > ... > <g:HTMLPanel styleName="{resources.css.header}"> > <span class="{resources.css.header}">Multi-Display > Hello MVP With Gin yay!</span> > </g:HTMLPanel> > ... > > The applications compiles (dev-mode) and runs. When I check the dom-tree of > the page (with firebug) is can see that the class element ist generated like > the docs say: > > <div class="*GBMET5DDPF*" style="position: absolute; left: 0px; top: 0px; > right: 0px; bottom: 0px;"><span class="*GBMET5DDPF*">Multi-Displa > > However there is now style-sheet containing a class *GBMET5DDPF *available > (according to firebug there are GwtApp.css and clean.css but not that > contains a class *GBMET5DDPF*)?* > > *what am i doing wrong here? > > thank you! > daniel > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.