我在下面的方法創建一個DIV節在我的頁面動作:命令按鈕不會調用
<div id="modalAlert" style="display: none;">
<h:panelGroup layout="block">
<p>My Heading </p>
</h:panelGroup>
<h:panelGroup layout="block">
</h:panelGroup><h:panelGroup layout="block">
<h:commandButton id="btnSaveConfirmation" value="save" action="#{myBean.method}"> </h:commandButton>
</h:panelGroup>
</div>
,我使用以下JS腳本來顯示使用jQuery一個SimpleModal窗口:
function showAlert() {
fundpickerdialog = $('#modalAlert').modal({
opacity : 100,
overlayCss: {backgroundColor:"#fff"},
modal : true,
dataId : 'modalAlert',
classname: 'ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable',
closeOnEscape : false,
width : 50,
height : 50
});
}
$(document).ready(function() {
showAlert();
}
});
模態窗口出現,但點擊保存按鈕時它不調用支持bean方法。
它只在表格內。我剛剛顯示了DIV部分,它是 – user1220373 2012-02-20 07:19:20
表格的一部分,因爲我無法看到整個頁面...我會再次猜測...也許你在窗體內部形成了?無論如何試圖擺脫其他人的形式,並嘗試我發佈的代碼spinet – Daniel 2012-02-20 07:35:22