我正在使用 JSF 2.1 primefaces 3.5 我在我编辑的每一行上都有 p:datatable - 删除 commandLink,在删除 h:commandLink 时我使用了 p:confirmDialog 当我单击删除 h:commandLink confirmDialog 弹出窗口时,如果我按下是 commandButton 操作方法没有调用..但是如果我把 p:confirmDialog 代码拿出来表单方法正在调用无法理解发生了什么
<h:body>
<p>hello</p>
<ui:composition template="/template/mastertemplate.xhtml">
<ui:define name="content">
<f:view>
<div id="main">
<div class="full_w" style="height: auto; max-width: 1150px; overflow: hidden;">
<!-- <div class="full_w" style="height: auto; max-width: 1045px; overflow: hidden;"> -->
<div class="h_title"><p class="h_titleParagraph" style="margin: 0px;">Head of accounts</p></div>
<h:form styleClass="form" id="headOfAccountsForm">
<!-- <p:panel id="analysisTheBudgetPenel" header="Analysis The Budget"> -->
<div class="divPanel">
<div class="divContent">
<div>
<p:tabView id="headOfAccountsId_tabview">
<p:tab title="Main Head Of Accounts" id="mainHeadOfAccountsId_tab">
<p:dataTable id="allMainHeadOfAccountsId_table" value="#{budgetHeadOfAccountsAction.budgetMainHeadOfAccountsBean.budgetMainHeadOfAccountsListBean}" var="budgetMainHeadOfAccountsList" rowIndexVar="allMainHeadOfAccounts_rowIndex">
//some columns
<p:column headerText="Edit">
<h:commandLink id="deleteId_commandLink" value="delete" onclick="confirmation_widgetVar.show(); return false;" />
</p:column>
</p:dataTable>
<p:confirmDialog header="Confirmation" message="Do you want to delete this row?" widgetVar="confirmation_widgetVar">
<p:commandButton actionListener="#{budgetHeadOfAccountsAction.deleteMainHeadOfAccountsOnAjax}" value="Yes" oncomplete="confirmation_widgetVar.hide();">
<f:setPropertyActionListener target="#{budgetMainHeadOfAccountsBean.budgetMainHeadOfAccountIdBean}" value="#{budgetMainHeadOfAccountsList.budgetMainHeadOfAccountIdBean}" />
</p:commandButton>
<p:commandButton value="No" onclick="confirmation_widgetVar.hide()" type="button" />
</p:confirmDialog>
// all others closing tags..