2014-06-05 75 views
0

版本:丰富:提示设置背景颜色

的RichFaces 4.3.5

的Apache MyFaces的2.1

问题:

我们正在从富人的面孔移植3至4 的问题是,我无法将背景颜色设置为丰富:工具提示组件

设置工具提示组件styleClass="tooltip-text" t不工作。 内置风格的.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; 
     } 
+0

什么附加样式panelGrid中:' '? –

+0

感谢您的重新申请Vasil。通过为panelGrid设置样式,它仍然在工具提示和面板网格之间留下一些没有颜色的部分。通过对tooltip和panelgrid设置相同的颜色也会留下一些没有颜色的部分。 – Atul

+0

@Vasil:谢谢你的回答,我还没有尝试过。如果有效,将接受答案。 – Atul

回答

1

有关设置背景颜色,你可以重新定义RichFaces的类。添加以下网页上的代码(或将其设置在适当的CSS文件):

<h:outputStylesheet> 
    .rf-tt-cntr { 
     background-color: red; 
    } 
</h:outputStylesheet> 
+0

感谢您的回复。除了以上风格之外,我们还需要使用!对于背景颜色属性非常重要。 – Atul