【发布时间】:2014-06-05 10:31:43
【问题描述】:
版本:
RichFaces 4.3.5
Apache MyFaces 2.1
问题:
我们正在从富面孔 3 迁移到 4。 问题是,我无法为rich:tooltip 组件设置背景颜色
为工具提示组件设置styleClass="tooltip-text" 不起作用。
看来.rf-tt-cnt 内置样式需要设置背景色。
但是如何将这种内置样式应用于以下结构?
设置styleClass="tooltip-text rf-tt-cnt" 似乎不起作用。
请帮忙。
代码:
<h:panelGroup>
<h:outputText id="statusId" style="cursor:hand; color:#0000F0; text-decoration:underline;" value="#{val.statusValue}" />
<rich:tooltip target="statusId" styleClass="tooltip-text" showEvent="click" direction="bottomLeft" followMouse="false" layout="block" >
<h:panelGrid columns="1">
<h:panelGroup>
<h:outputLabel value="Detail Status " rendered="#{bean.statusDescr}" />
</h:panelGroup>
</h:panelGrid>
</rich:tooltip>
</h:panelGroup>
.tooltip-text{
background-color:orange;
}
【问题讨论】:
-
为 panelGrid 添加样式怎么样:
<h:panelGrid columns="1" style="background-color:orange;">? -
感谢您的回复 Vasil。通过为 panelGrid 设置样式,它仍然会在工具提示和面板网格之间留下一些没有颜色的部分。通过为工具提示和面板网格设置相同的颜色也会使某些部分没有颜色。
-
@Vasil:感谢您的回答。我还没有尝试。如果可行,将接受答案。