Solved

rich:tooltip on rich:tree ?

Posted on 2009-06-30
6
880 Views
Last Modified: 2013-11-24
Is there a way to display some tooltip into each element of the tree, displaying by exemple the "description" field of each item?
0
Comment
Question by:Nargzul
  • 4
  • 2
6 Comments
 
LVL 3

Expert Comment

by:serrutom
ID: 24753115
You can add a tooltip to the label of the tree.

If you want a tooltip on the icon you can use javascript (onmouseover, onmouseout) to show and hide a popup box.
<rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">

   <rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif" icon="/images/tree/singer.gif">

      <h:outputText value="#{item.name}" title="Tooltip" />

   </rich:treeNode>

   <rich:treeNode type="album" iconLeaf="/images/tree/disc.gif" icon="/images/tree/disc.gif">

      <h:outputText value="#{item.title}" title="Tooltip" />

   </rich:treeNode>

   <rich:treeNode type="song" iconLeaf="/images/tree/song.gif" icon="/images/tree/song.gif">

      <h:outputText value="#{item.title}" title="Tooltip" />

   </rich:treeNode>

</rich:tree>

Open in new window

0
 
LVL 1

Author Comment

by:Nargzul
ID: 24753481
But the problem is the Tree is dynamic and recursive.

So how can I specify this?

I can put a outputText in the recursive tree adaptor???

<rich:tree id="tree" switchType="ajax" ajaxSubmitSelection="true"  value="#{AddDeal.deal.idRequestedService}">

  <rich:recursiveTreeNodesAdaptor roots="#{AddDeal.rootService}" var="item" nodes="#{item.serviceCollection}" />

</rich:tree>

Open in new window

0
 
LVL 1

Author Comment

by:Nargzul
ID: 24753852
I've try this but it doesn't work:
<rich:tree id="tree" switchType="ajax" ajaxSubmitSelection="true"  value="#{AddDeal.deal.idRequestedService}">

  <rich:recursiveTreeNodesAdaptor roots="#{AddDeal.rootService}" var="item" nodes="#{item.serviceCollection}" >

    <h:outputText value="#{item.name}" title="#{item.description}"/>

  </rich:recursiveTreeNodesAdaptor>

</rich:tree>

Open in new window

0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 1

Author Comment

by:Nargzul
ID: 24845109
up!
0
 
LVL 3

Accepted Solution

by:
serrutom earned 250 total points
ID: 24846957
I never used the recursiveTreeNodeAdaptor, so won't be able to help you. In the documentation, there is no title parameter for this component.

What you can do, write your own implementation on the recursiveTreeNodeAdaptor, and add an extra paramter 'title' to it.
You probably will need to re-write your tag, component and renderer.
0
 
LVL 1

Author Closing Comment

by:Nargzul
ID: 31598546
To long to implement.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Starting to learn JAVA, 7 59
Strange loading of website behaviour 3 32
Java - Why doesn't this JFrame work 3 41
xampp tool 12 25
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now