1
I have a delete button inside my dataTable
, but every time I click on it confirmDialog
does not appear. I am doing as follows:
<p:column style="width: 100px; text-align: center">
<p:button icon="ui-icon-pencil" title="Editar" />
<p:commandButton icon="ui-icon-trash" title="Excluir" oncomplete="confirmacaoExclusao.show()" />
</p:column>
confirm:
<p:confirmDialog header="Exclusão de Produto"
message="Tem certeza que deseja excluir o Produto?"
widgetVar="confirmacaoExclusao" severity="alert">
<p:button value="Não"
onclick="confirmacaoExclusao.hide(); return false" />
<p:commandButton value="Sim" oncomplete="confirmacaoExclusao.hide();" />
</p:confirmDialog>
I still wasn’t calling the action to delete anyway, I was just testing the dialog, but it’s hard to make it appear kk. Even with your code not working yet, I click delete and the dialog does not appear
– DiegoAugusto
Opa, I made an edit, because I see a parameter missing in the confirmDialog call, check the edition and if this parameter was missing.
– WyllianNeo
beauty, I’ll test again
– DiegoAugusto
Yeah, it didn’t work. I’ve followed some tutorials and nothing.
– DiegoAugusto
I think the problem is in the button that calls the dialog. But I don’t know what can be
– DiegoAugusto
What else have you tried on the call button besides the one I told you about?
– WyllianNeo
I tried to put onComplete, onClick... but nothing works. It’s like this at the moment:
<p:commandButton icon="ui-icon-trash" title="Excluir"
 oncomplete="excluirManualDialog.show()" immediate="true"/>
– DiegoAugusto
I usually use compandLink with icons to make the modal call... take a look, see if you have any ideas. Maybe you’re missing an update, or pass the item you want to delete. <p:commandLink ajax="true" immediate="true" oncomplete="excluirManualDialog.show()" title="delete" update="@form"> <f:setPropertyActionListener target="#{meuMBean.editEntity}" value="#{itemDaLista}" /> <h:graphicImage value="/Resources/img/icons/delete.png"/> </p:commandLink>
– WyllianNeo
Didn’t work either.
– DiegoAugusto
Let’s go continue this discussion in chat.
– WyllianNeo