-
1. Re: Trouble with TreeNodes and ToolTips
aparisi Oct 2, 2007 5:05 PM (in response to aparisi)Okay, so I've answered my third question. By changing my code from this:
<rich:tree value="#{TreeBean.treeNode}" ajaxSubmitSelection="true" switchType="ajax" nodeSelectListener="#{TreeBean.processSelection}" var="item"> <rich:treeNode> <h:outputText value="#{item.name}" /> ...
...to this:<rich:tree value="#{TreeBean.treeNode}" ajaxSubmitSelection="true" switchType="ajax" nodeSelectListener="#{TreeBean.processSelection}" var="item"> <rich:treeNode> <h:outputText value="#{item}" /> ...
...my <rich:treeNode> is working. I figured the 'var' field of the <rich:tree> was significant, but I never thought to remove the '.name' from the EL.
Of course, I could still use help with the other two questions. -
2. Re: Trouble with TreeNodes and ToolTips
maksimkaszynski Oct 3, 2007 9:43 AM (in response to aparisi)About question 2 - I'm unable to reproduce such behavior. Whenever I click the node, I get tooltip displayed.
about first question - could you please explain in detail what is that you need? -
3. Re: Trouble with TreeNodes and ToolTips
aparisi Oct 3, 2007 2:42 PM (in response to aparisi)Regarding question 2: I've tried this in both IE6 and IE7 on two machines. For some reason, when I click on a node, I must move my mouse and click on the node again to get the tooltip. But beyond the code I've posted, I have no other suggestions if the problem can't be duplicated.
Regarding question 1: The hope was that I could insert a tooltip into a tree that didn't have any treenode tags in it. This would have been a workaraound for my third question. Since my tree is working now, This question is more curiosity than necessity.
But now, I have another question that I was hoping someone could answer: is there a way to make these tooltips appear to the right of the tree at a uniform distance. Below is what I'm envisioning:<h:panelGrid columns="2"> <rich:tree value="#{TreeBean.treeNode}" ajaxSubmitSelection="true" switchType="ajax" nodeSelectListener="#{TreeBean.processSelection}" var="item"> <rich:treeNode> <h:outputText value="#{item.name}" /> <rich:toolTip event="onclick" mode="client" layout="block" horizontalOffset="25" verticalOffset="-12"> <h:outputText value="This is the ToolTip for #{TreeBean.nodeTitle}" /> </rich:toolTip> </rich:treeNode> </rich:tree> <!-- Some code to make the tooltip appear to the right of the tree at a uniform distance --> </h:panelGrid>
I don't want the tooltip to appear a uniform distance from the end of the outputText, but if I could display all the tooltips at once, I'd want them to appear in a left-aligned column. Is this possible, or can I create this behavior using a different RichFaces tool?