My purpose is to show an alert after a delete : So my .xhmtl code is:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:h="http://xmlns.jcp.org/jsf/html">
<h:form id="form">
....
<p:growl autoUpdate="true" id="message" for="message" showDetail="true"/>
</h:form>
and in my bean after delete I do:
FacesMessage infoMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, "DELETE", "DELETE OK" );
FacesContext.getCurrentInstance().addMessage("form:message", infoMsg);
The problem is the object is deleted correctly but the alert is not show. Anyone can help me?
In Primefaces 7 Documentation
growldoes not haveautoupdate.So you are using a different version.
I give you some sample code in case that you want to delete an item in a
datatableAnd the code in ManageBean