Growl component "life" attribute only works the first time

Asked

Viewed 85 times

0

We are running a JSF project using Primefaces (v5.0) and created a simple validation for blank fields in our form.

The first time it is fired, the component performs the actions correctly. If the user again forgets a blank field, the second time p:Growl is called it simply stays permanently on the screen, even the Sticky attribute set to false.

Below the Growl I use together with a field example I check for validation:

<p:growl id="growl" sticky="false" life="1800"/>

<h:outputLabel for="nomePessoa" value="Nome Completo"/>
<p:inputText type="text" class="form-control form-control-lg" id="nomePessoa"value="#{PessoaMB.pessoa.nome}" placeholder="Nome" required="true" requiredMessage="Nome não informado!">
  • Please add more code so we can simulate.

  • Douglas, I have already solved the problem using javascript. Thank you.

1 answer

0

Try this:

<p:growl id="growl" sticky="false" autoUpdate="true" life="1800"/>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.