0

I have been checking out some issues about this problem but it did not work.

There are two situations:

1.I start on /alertas/index.jsf

I log in with my username and password and according to my faces-config.xml I am redirected to /alertas/pages/alertas.jsf and my page is showed correctly with all the functions working but growl messages. (The URL showed at the top when I am in alertas.jsf is index.jsf)

  1. If I am already logged and I access directly to /alertas/pages/alertas.jsf, everything works, even growl messages.

I do not know if this could be a problem of the redirection. I tried the next sentence which I read on another threads, but did not work.

context.getExternalContext().getFlash().setKeepMessages(true);

The content of my file faces-config is:

<?xml version="1.0" encoding="UTF-8"?>

  <faces-config
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
  version="2.0">

      <navigation-rule>
    <from-view-id>/index.xhtml</from-view-id>
    <navigation-case>
        <from-outcome>irAlertas</from-outcome>
        <to-view-id>/pages/alertas.xhtml</to-view-id>
    </navigation-case>
      </navigation-rule>

  </faces-config>

I am searching for a solution but it is being really hard.

Thanks for the time !!

1 Answers1

0

It is solved guys, I tried another thing which I found in this post:

Primefaces growl is not working in all the pages

Apparently is a bug of primefaces, just add the property ajax="false" in the commandButtons or tags that update your growl.

Community
  • 1
  • 1
  • 1
    that doesnt work at all ... it doesnt even make sense - the VIEW is being RECREATED so all of the old messages are gone, no matter if the request is asynchronous or not – specializt Dec 10 '15 at 14:41