Change By: Jan Papousek (20/Jun/12 2:54 AM)
Description: A rich:contextMenu is not working correctly when used with rich:tree.  For example, consider the following:

{code}
<rich:tree id="tree" var="node"
           toggleType="ajax" toggleListener="#{node.onNodeToggle}"
           selectionType="ajax" selectionChangeListener="#{myBean.onNodeSelection}">
  <rich:treeModelRecursiveAdaptor roots="#{myBean.treeRoots}" nodes="#{node.childNodes}">
    <rich:treeNode id="treeNode">
      <h:panelGrid columns="2" border="0" cellpadding="0px" cellspacing="0px">
        <h:graphicImage value="/images/data_icon.gif" />
        <h:outputText value="#{node.data.id}" />
      </h:panelGrid>
      <rich:contextMenu attached="true" target="treeNode" mode="ajax">
        <rich:menuItem label="#{node.data.id}" disabled="true"/>
        <rich:menuItem label="Show" mode="server" action="#{myBean.show}"/>
      </rich:contextMenu>
    </rich:treeNode>
  </rich:treeModelRecursiveAdaptor>
</rich:tree>
{code}  

When the context menu coded as above is rendered, it is clipped by the borders of its parent tree node, so I can only see a narrow band corresponding to the topmost portion of the menu.  I see enough to verify that the label of the first menu item has correct value

If I move rich:contextMenu to outside of rich:tree, the menu is rendered only at the initial right-click.  After that, I see only the browser's context menu.  After some experimentation,  I've added render="@form" to rich:treeNode.

Either way, I still get an occasional script error 'this.popup' is null or not an object, after expanding a tree node.
Steps to Reproduce: # checkout git://github.com/papousek/richfaces-sanbox.git and checkout RF-12332 (or download attached test project)
# build the project, deploy it on JBoss AS 7.1 and open http://localhost:8080/richfaces-sandbox-jee6/
# right click on some node in the first tree
Environment: RichFaces 4.2.2.Final
Unknown version of JSF
JBoss Web 7.0.13.Final
Java(TM) SE Runtime Environment 1.6.0_31-b04 @ Linux
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20100101 Firefox/12.0
Forum Reference: https://community.jboss.org/message/741815
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira