On 24 jan, 21:34, rletient <[email protected]> wrote: > I found the solution with the StyleInjector class. > > ------------------------------------------------- > package org.homework.css.client; > > import ... > > public class MyComponent extends Composite { > > private static MyComponentUiBinder uiBinder = GWT > .create(MyComponentUiBinder.class); > > interface MyComponentUiBinder extends UiBinder<Widget, MyComponent> { > } > > @UiField > Button button; > > public MyComponent(String firstName) { > StyleInjector.inject(MyResources.INSTANCE.mycss().getText());
The preferred way would be MyResources.INSTANCE.mycss().ensureInjected () Instead of MyResources.INSTANCE, you could also use a "@UiField MyCss myres". -- 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.
