<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
xmlns:tr="http://myfaces.apache.org/trinidad"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
...
<h:form id="form1">
</h:form>
<h:form id="form2"
rendered="true">
<af:menuBar rendered="true" clientComponent="true" id="mbPop" binding="#{editor.component}">
<af:menu textAndAccessKey="#{language.space_share}">
<af:commandMenuItem clientComponent="true" textAndAccessKey="#{language.space_share_to_user}">
</af:commandMenuItem>
<af:commandMenuItem id="cmiPopup" clientComponent="true" textAndAccessKey="#{language.space_share_to_group}">
<af:showPopupBehavior popupId="ppTest"
align="afterStart"
alignId="mbPop"/>
</af:commandMenuItem>
</af:menu>
</af:menuBar>
<af:popup id="ppTest">
<af:commandButton text="Test Popup Button" id="testButton"
action="#{backing_index.commandButton_action}"/>
</af:popup>
//code here
</h:form>
...
backing:
public String commandButton_action() {
System.out.println("server print out.");
return null;
}
注:删除form1时可得
server print out.
testButton位于//code here时可得server print out.