组合使用target和targetSelector就可以啦,如下: <rich:tree id="ruleTree" value="#{treeAction.ruleTree}" var="node" nodeType="#{node.type}" selectionChangeListener="#{treeAction.selectTreeNode}" toggleType="client" selectionType="ajax"> <rich:treeNode type="CATEGORY" styleClass="categoryTag"> <h:outputLabel value="#{node.name}"> <a4j:ajax event="click" execute="@this" render="propCol"/> </h:outputLabel> </rich:treeNode> <rich:treeNode type="CONDITION" styleClass="conditionTag"> <h:outputLabel value="#{node.name}"> <a4j:ajax event="click" execute="@this" render="propCol"/> </h:outputLabel> </rich:treeNode> <rich:treeNode type="RULE" styleClass="ruleTag"> <h:outputLabel value="#{node.name}"> <a4j:ajax event="click" execute="@this" render="propCol"/> </h:outputLabel> </rich:treeNode> </rich:tree> <rich:contextMenu id="categoryMenu" target="ruleTree" targetSelector=".categoryTag" mode="ajax"> <rich:menuItem label="#{messages['button.addCondition']}"/> <rich:menuItem label="#{messages['button.addRule']}"/> <rich:menuItem label="#{messages['button.delete']}"/> </rich:contextMenu> <rich:contextMenu id="conditionMenu" target="ruleTree" targetSelector=".conditionTag" mode="ajax"> <rich:menuItem label="#{messages['button.addCondition']}"/> <rich:menuItem label="#{messages['button.addRule']}"/> <rich:menuItem label="#{messages['button.copyPaste']}"/> <rich:menuItem label="#{messages['button.delete']}"/> </rich:contextMenu> <rich:contextMenu id="ruleMenu" target="ruleTree" targetSelector=".ruleTag" mode="ajax"> <rich:menuItem label="#{messages['button.copyPaste']}"/> <rich:menuItem label="#{messages['button.delete']}"/> </rich:contextMenu>