Solved

rich:tooltip on rich:tree ?

Posted on 2009-06-30
6
878 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:Nargzul
Comment Utility
up!
0
 
LVL 3

Accepted Solution

by:
serrutom earned 250 total points
Comment Utility
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
Comment Utility
To long to implement.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
IT Company 5 68
wordmultiple challenge 12 89
Which is the latest version of Apache Tomcatl 3 35
advertisement module in core php 4 79
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

744 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

9 Experts available now in Live!

Get 1:1 Help Now