2013-10-04 3 views
1

Я использую JSF 2.1-первичность 3.5 У меня есть p: datatable на каждой строке У меня есть редактирование - delete commandLink, при удалении h: commandLink я использовал p: confirmDialog, когда я нажимаю delete h : commandLink confirmDialog всплывающее окно, если я нажимаю да метод действия CommandButton не вызывая .. , но если я ставлю р: confirmDialog код из метода формы является вызовом не может понять, что происходитметод не вызывается на 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.. 

ответ

2

Просто попробуйте использовать процесс атрибут, такой как

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

и дайте мне знать

+0

Пожалуйста, не оставляйте комментарии в качестве ответов, особенно если вы не уверены в результатах. – skuntsel

+0

@bhola да. Я забыл атрибут «process», спасибо, много :) –

Смежные вопросы