0

I am trying to find a way to display a tooltip (or the html 'title' attribute) whenever I mouseOver an option element. I am using JSF's t:selectOneMenu and f:selectItems.

Values for the selectItems are passed as a variable (ArrayList) from my backing bean. My xhtml codes are found below:

<t:selectOneMenu id="mySelectOneMenu" value="#{backerBean.myForm.status}">
    <f:selectItems id="mySelectItems" value="#{backerBean.statusSelectItems}"/>
</t:selectOneMenu>

Values for the dropdown are Completed, Failed, and In Progress. I want the tooltip say something about each status whenever hovered on.

I have tried using the rich:tooltip tag but could not get it to work to change dynamically. Can anyone please help me perform this. I am open to javascript or jquery methods. If it can be done using JSF tags and attributes, better!

gallea01
  • 82
  • 1
  • 8

2 Answers2

0

You will actually need javascript and css to tune this completely along with the richfaces tooltip. Richfaces 3.3.3 had a bug associated with tooltip.

Here is an example of a jQuery plugin that should work with RichFaces.

Josef E.
  • 2,179
  • 4
  • 15
  • 30
0

Please see my question.
There's a jQuery snippet that adds title attribute to all options generated by selectOneMenu/selectItems. Most browsers will render this as a tooltip.

Community
  • 1
  • 1
Yuri
  • 1,695
  • 1
  • 13
  • 23