[primefaces] probleme confirmDialog
Salut,
j'ai un problème avec cette méthode de suppression, je veut affiche confirmDialog pour confirmer la suppression, le problème lorsque je clique sur le bouton le fournisseur ne supprime pas :(
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<h:form id="form">
<p:dataTable value="#{fournisseurBean.listFournisseur}" var="fr">
<f:facet name="header">
List des employes
</f:facet>
<p:column headerText="Code">
<h:outputText value="#{fr.matricule}" />
</p:column>
<p:column headerText="Titre">
<h:outputText value="#{fr.nom}" />
</p:column>
<p:column style="width:24px">
<p:commandLink update=":form" oncomplete="cofirmation.show()"
title="View Detail" styleClass="ui-icon ui-icon-search">
<f:setPropertyActionListener value="#{fr}" target="#{fournisseurBean.fournisseur}" />
</p:commandLink>
</p:column>
</p:dataTable>
<p:confirmDialog widgetVar="cofirmation" severity="alert" appendToBody="true"
message="Vous voulez supprimer ?" header="Supprime Fournisseur">
<p:commandButton value="Yes" oncomplete="cofirmation.hide()" actionListener="#{fournisseurBean.delet(fr.matricule)}"/>
</p:confirmDialog>
</h:form> |
et lorsque je fait comme ça, la fournisseur est supprime avec succès
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<h:form id="form">
<p:dataTable value="#{fournisseurBean.listFournisseur}" var="fr" id="Tab">
<f:facet name="header">
List des employes
</f:facet>
<p:column headerText="Code">
<h:outputText value="#{fr.matricule}" />
</p:column>
<p:column headerText="Titre">
<h:outputText value="#{fr.nom}" />
</p:column>
<p:column style="width:24px">
<p:commandButton action="#{fournisseurBean.delet(fr.matricule)}" title="Supprimer"
update=":form:Tab" icon="ui-icon-trash" style=" height: 20px;"/>
</p:column>
</p:dataTable>
</h:form> |
Merci d'avance pour votre aide