p:tooltip for p:treeNode

UI Components for JSF
Post Reply
rafaeltscs
Posts: 44
Joined: 18 Dec 2010, 23:10

21 Dec 2011, 20:23

Is there a way to create tooltips for treeNodes?

I've tried some workarrounds with no success... :?
NetBeans 7.3, Glassfish 3.1.2, Java EE 7, PrimeFaces 3.5 , Mojarra 2.1.17

rafaeltscs
Posts: 44
Joined: 18 Dec 2010, 23:10

22 Dec 2011, 14:22

No ideas? It should work like the contextMenu. But I am not getting it working. I want each node of my tree to have its own tooltip.
NetBeans 7.3, Glassfish 3.1.2, Java EE 7, PrimeFaces 3.5 , Mojarra 2.1.17

jdelouche
Posts: 1
Joined: 13 May 2012, 22:40

13 May 2012, 22:45

I have tried the following which is working but I would like to have a more advanced tooltip to show complex data belonging to the current node, any ideas ?


<p:tree id="treeSingle" value="#{treeBean.root}" var="node"
dynamic="true" selectionMode="single"
selection="#{treeBean.selectedNode}">

<p:ajax event="expand" update=":form:messages"
listener="#{treeBean.onNodeExpand}" />
<p:ajax event="collapse" update=":form:messages"
listener="#{treeBean.onNodeCollapse}" />
<p:ajax event="select" update=":form:messages,:browser"
listener="#{treeBean.onNodeSelect}" />
<p:ajax event="unselect" update=":form:messages"
listener="#{treeBean.onNodeUnselect}" />

<p:treeNode id="myTreeNode" expandedIcon="#{treeBean.expandedIcon}"
collapsedIcon="#{treeBean.collapsedIcon}">
<h:outputText id="nodeValue" value="#{node}" />
<p:tooltip for="nodeValue" value="#{node}" showEffect="fade"
hideEffect="fade" />
</p:treeNode>
</p:tree>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests