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());
initWidget(uiBinder.createAndBindUi(this));
button.setText(firstName);
}
@UiHandler("button")
void onClick(ClickEvent e) {
Window.alert("Hello!");
}
}
--
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.