on 02-10-2015 11:49 AM
Hi Experts
Did some one attached a rich tooltip control for any of the nodes of a Tree control? If yes, could you please share your knowledge on how to achieve this?
Thank You
Regards
Giri
Not sure what your issue is... you can simply attach it to the tree node:
<TreeNode text="{name}">
<tooltip>
<RichTooltip title="{title}" text="{description}" />
</tooltip>
</TreeNode>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Robin,
your solution works as a tooltip on the entire tree node, however, I believe Giridhar needs it at the node level instead of at the parent level.
Further, the nodes only display text, so my suggestion would be that 1) investigate if the node itself can trigger an event to display the rich tooltip since its tooltip feature is the text property of the node, 2) possibly create a custom tooltip if the node itself cannot open the rich tooltip provided by the framework
Hi Sergio,
As I read it,
a rich tooltip control for any of the nodes of a Tree control
my solution works for every tree node in the tree, regardless of the level. If the binding is set correctly on the parent Tree control, every node will have a corresponding RichTooltip, showing the bound values, images and what else is needed to show
FYI, the whole Tree control could look like this:
<Tree nodes="{path:'/',parameters:{arrayNames:['data']}}">
<nodes>
<TreeNode text="{name}">
<tooltip>
<RichTooltip title="{title}" text="{description}" imageSrc="{image}"/>
</tooltip>
</TreeNode>
</nodes>
</Tree>
See this working example: Plunker
Hi Robin,
Thank you for your reply. What I mean is, in your example, how can I set the "node 1.1" and "node 1.2.1" as a link control? Then I can use its href and target attribute...
Br,
Pany
You can't. According to the API, a sap.ui.commons.Tree control expects the aggregation 'nodes' to be of type sap.ui.commons.TreeNode.
Then again, why would you use a link in a tree? It will confuse the users as you can no longer 'select' a tree node (which is the whole point of a tree).
But if you still want to achieve some sort of link functionality, better use the TreeNode's 'select' event, and use a href and target from the context there
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.