Use addStyleNames
in such situations, like this:
<g:DecoratorPanel addStyleNames="{style.myCssClass}">
It's a little trick I picked up on the GWT's Google Group - too bad it's not (?) mentioned in the official documentation.
PS: I'm actually missing a really comprehensive documentation for UiBinder. I grep
ped the GWT sources for addStyleNames
and found this file: WidgetBasedUi.ui.xml - it seems to contain some interesting use cases for UiBinder, including the one with addStyleNames
.
If someone knows any other good/secret references for UiBinder, please share :)