Tracking--一個JSF頁面存在多個Form導致 Oracle ADF Faces Rich Client Components無法提交到Server端
<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.
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;
}
testButton位于//code here時可得server print out.
posted on 2009-05-29 10:13 SteveLam 閱讀(281) 評論(0) 編輯 收藏 所屬分類: Tracking