0
votes

Version :

RichFaces 4.3.5

Apache MyFaces 2.1

Issue :

We are migrating from rich faces 3 to 4. The issue is , I am not able to set back ground colour for rich:tooltip component

Setting styleClass="tooltip-text" for tooltip component is not working. It seems that .rf-tt-cnt built in style needs to be set with background-color. But how will this built-in style be applied to below structure ?

Setting styleClass="tooltip-text rf-tt-cnt" doesn't seem to work. Please help.

Code :

<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;
      }
1
What about add style for panelGrid: <h:panelGrid columns="1" style="background-color:orange;">?Vasil Lukach
Thanks for your repply Vasil. By setting style for panelGrid , it still leaves some part between tooltip and panel grid without colour. By setting same colour to both tooltip and panelgrid also leaves some part without colour.Atul
@Vasil:Thanks for the answer.I am yet to try out. Will accept the answer if it works.Atul

1 Answers

1
votes

For setup background color in tooltip you can redefine RichFaces class. Add following code on your page (or set it in proper CSS file):

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