本文介绍了方法未在p:confirmDialog上调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JSF 2.1 primefaces 3.5我在编辑的每一行上都有p:datatable-在删除h:commandLink时删除commandLink,当我单击delete h:commandLink ConfirmDialog弹出窗口时,如果我按了yes,则使用了p:confirmDialog.commandButton操作方法未调用.但是如果我将p:confirmDialog代码放出,那么form方法正在调用就无法理解发生了什么事

i am using JSF 2.1 primefaces 3.5i have p:datatable on every row i have edit - delete commandLink, on delete h:commandLink i have used p:confirmDialog when i click delete h:commandLink confirmDialog popup, if i press yes commandButton action method is not invoking..but if i put p:confirmDialog code out the form method is invoking can't understand what happening

<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..

推荐答案

只需尝试使用

<p:commandButton style="position:absolute;right:-150px;" process="@this" 

让我知道

这篇关于方法未在p:confirmDialog上调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 06:46