将类名称添加到uibinder xml文件中的元素 [英] add class name to element in uibinder xml file
问题描述
以下内容替换当前的css类名称。它似乎称为 setStyleName
。
< g:DecoratorPanel styleName = {} style.myCssClass >
我真正想要做的是添加一个类名,例如调用 addStyleName 。
是否有可能做我想做的事?
在这种情况下使用 addStyleNames
,如下所示:
< g:DecoratorPanel addStyleNames ={style.myCssClass}>
这是我在 GWT的Google Group - 太糟糕了,在官方文档中没有提到(?)。
PS:我实际上错过了一个非常全面的UiBinder文档。我为 addStyleNames
找到了这个文件: WidgetBasedUi.ui。 xml - 它似乎包含一些有趣的UiBinder用例,包括带有 addStyleNames
的一个。
如果有人知道任何其他的好/ UiBinder的秘密参考资料,请分享:)
The following replaces any current css class names. It appears to call setStyleName
.
<g:DecoratorPanel styleName="{style.myCssClass}">
What I really want to do is add a class name, like calling addStyleName
.
Is it possible to do what I'm attempting?
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 :)
这篇关于将类名称添加到uibinder xml文件中的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!