<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Flash scope loosing messages during redirect</title>
  <link rel="self" href="https://liferay.dev/zh/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=15300326" />
  <subtitle>Flash scope loosing messages during redirect</subtitle>
  <id>https://liferay.dev/zh/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=15300326</id>
  <updated>2026-06-06T10:08:22Z</updated>
  <dc:date>2026-06-06T10:08:22Z</dc:date>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=41036460" />
    <author>
      <name>Wojciech Tutro</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=41036460</id>
    <updated>2014-08-05T20:52:28Z</updated>
    <published>2014-08-05T20:52:28Z</published>
    <summary type="html">Hi Neil,&lt;br /&gt;&lt;br /&gt;Sorry for so big delay - I had lot of work last days.&lt;br /&gt;In the mean time I had created some workaround for this issue. My problem was not exactly passing messages from one view to another but passing small object (as I can not use JSF2.2 with FlowScope I decided to &amp;#34;manually&amp;#34; pass the object through few pages). I ended up with bean in session scope.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Wojtek</summary>
    <dc:creator>Wojciech Tutro</dc:creator>
    <dc:date>2014-08-05T20:52:28Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=39916874" />
    <author>
      <name>Neil Griffin</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=39916874</id>
    <updated>2014-07-11T11:37:23Z</updated>
    <published>2014-07-11T11:37:23Z</published>
    <summary type="html">Hi Wojciech,&lt;br /&gt;&lt;br /&gt;I did some research and the &lt;a href="https://svn.java.net/svn/mojarra~svn/tags/2.1.21/jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java"&gt;Mojarra 2.1 NavigationHandlerImpl.java&lt;/a&gt; and &lt;a href="https://svn.java.net/svn/mojarra~svn/tags/2.2.5/jsf-ri/src/main/java/com/sun/faces/application/NavigationHandlerImpl.java"&gt;Mojarra 2.2 NavigationHandlerImpl.java&lt;/a&gt; classes correctly call Flash.setRedirect(true) when executing a navigation-rule with &amp;lt;redirect/&amp;gt;.&lt;br /&gt;&lt;br /&gt;Although the Mojarra 2.1 version does not call Flash.setKeepMessages(true), the Mojarra 2.2 version will indeed call that method if there is an &lt;a href="http://docs.oracle.com/javaee/7/javaserverfaces/2.2/vdldocs/facelets/f/viewAction.html"&gt;f:viewAction&lt;/a&gt; tag inside of the &lt;a href="http://docs.oracle.com/javaee/7/javaserverfaces/2.2/vdldocs/facelets/f/metadata.html"&gt;f:metadata&lt;/a&gt; tag.&lt;br /&gt;&lt;br /&gt;Kind Regards,&lt;br /&gt;&lt;br /&gt;Neil</summary>
    <dc:creator>Neil Griffin</dc:creator>
    <dc:date>2014-07-11T11:37:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=39871072" />
    <author>
      <name>Neil Griffin</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=39871072</id>
    <updated>2014-07-10T12:14:57Z</updated>
    <published>2014-07-10T12:14:57Z</published>
    <summary type="html">Hi Wojciech,&lt;br /&gt;&lt;br /&gt;Are you calling FacesContext.getCurrentInstance().getExternalContext().redirect(String) from your JSF backing bean? Or are you using &amp;lt;redirect/&amp;gt; in a navigation-rule? If you are doing it from a backing bean, then please try calling FacesContext.getCurrentInstance().getExternalContext().getFlash().setRedirect(true) first.&lt;br /&gt;&lt;br /&gt;Please let us know if that works for you. We are currently investigating whether or not this should be done automatically by Liferay Faces Bridge, or if it should be the responsibility of the application developer.&lt;br /&gt;&lt;br /&gt;Kind Regards,&lt;br /&gt;&lt;br /&gt;Neil</summary>
    <dc:creator>Neil Griffin</dc:creator>
    <dc:date>2014-07-10T12:14:57Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=39791912" />
    <author>
      <name>Wojciech Tutro</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=39791912</id>
    <updated>2014-07-08T20:24:42Z</updated>
    <published>2014-07-08T20:24:42Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;I am developing an application and I need to use flash scope but problem described here still appears. Do You have any workaround or fix for this?</summary>
    <dc:creator>Wojciech Tutro</dc:creator>
    <dc:date>2014-07-08T20:24:42Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15633715" />
    <author>
      <name>Neil Griffin</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15633715</id>
    <updated>2012-08-15T14:04:02Z</updated>
    <published>2012-08-15T14:04:02Z</published>
    <summary type="html">OK I just created &lt;a href="http://issues.liferay.com/browse/FACES-1386"&gt;FACES-1386&lt;/a&gt; in order to track this to closure. Please click on the &amp;#34;watch&amp;#34; link in JIRA for further updates. Unfortunately we will have to schedule this to be fixed after the GA1 release, since we&amp;#39;re in a QA cycle at this time.</summary>
    <dc:creator>Neil Griffin</dc:creator>
    <dc:date>2012-08-15T14:04:02Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15612977" />
    <author>
      <name>Robson Miranda</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15612977</id>
    <updated>2012-08-14T18:09:23Z</updated>
    <published>2012-08-14T18:09:23Z</published>
    <summary type="html">It&amp;#39;s a AJAX-based redirect. I tested removing Icefaces JARs and the problem persists. I also tested using &amp;#34;action-url-redirect&amp;#34; setted to true in liferay-portlet.xml, and the messages are also lost.&lt;br /&gt;&lt;br /&gt;Thanks.&lt;br /&gt;  Robson</summary>
    <dc:creator>Robson Miranda</dc:creator>
    <dc:date>2012-08-14T18:09:23Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15525462" />
    <author>
      <name>Neil Griffin</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15525462</id>
    <updated>2012-08-10T14:27:52Z</updated>
    <published>2012-08-10T14:27:52Z</published>
    <summary type="html">Is it an ajax-based &amp;lt;redirect /&amp;gt; (portlet ResourceRequest) or does it invoke a full HTTP GET (portlet RenderRequest)?</summary>
    <dc:creator>Neil Griffin</dc:creator>
    <dc:date>2012-08-10T14:27:52Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15457961" />
    <author>
      <name>Robson Miranda</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15457961</id>
    <updated>2012-08-08T13:34:39Z</updated>
    <published>2012-08-08T13:34:39Z</published>
    <summary type="html">I created a simple application, and the keepMessages works correctly if it is used out of Liferay. So, I think this bug is in the bridge.</summary>
    <dc:creator>Robson Miranda</dc:creator>
    <dc:date>2012-08-08T13:34:39Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15365686" />
    <author>
      <name>Lee Taylor</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15365686</id>
    <updated>2012-08-06T01:53:19Z</updated>
    <published>2012-08-06T01:53:19Z</published>
    <summary type="html">It may be a bug in the Icefaces.</summary>
    <dc:creator>Lee Taylor</dc:creator>
    <dc:date>2012-08-06T01:53:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15331269" />
    <author>
      <name>Neil Griffin</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15331269</id>
    <updated>2012-08-03T16:45:00Z</updated>
    <published>2012-08-03T16:45:00Z</published>
    <summary type="html">Would you consider this to be a bug in ICEfaces or perhaps in the bridge?</summary>
    <dc:creator>Neil Griffin</dc:creator>
    <dc:date>2012-08-03T16:45:00Z</dc:date>
  </entry>
  <entry>
    <title>RE: Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15301269" />
    <author>
      <name>Robson Miranda</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15301269</id>
    <updated>2012-08-02T22:00:16Z</updated>
    <published>2012-08-02T22:00:16Z</published>
    <summary type="html">I sort of solved the problem. It seems that ICEfaces was causing double post (one from AJAX and other normal). I&amp;#39;ll try to investigate further.</summary>
    <dc:creator>Robson Miranda</dc:creator>
    <dc:date>2012-08-02T22:00:16Z</dc:date>
  </entry>
  <entry>
    <title>Flash scope loosing messages during redirect</title>
    <link rel="alternate" href="https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15300325" />
    <author>
      <name>Robson Miranda</name>
    </author>
    <id>https://liferay.dev/zh/c/message_boards/find_message?p_l_id=119785294&amp;messageId=15300325</id>
    <updated>2012-08-02T20:54:47Z</updated>
    <published>2012-08-02T20:54:47Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;I`m having a problem with the flash scope. If I have a navigation rule with &amp;#34;&amp;lt;redirect/&amp;gt;&amp;#34; defined, the messages stored in flash scope are lost, even though I had set the &amp;#34;keepMessages&amp;#34; flag in the flash object, using LiferayFacesContext.getInstance().getExternalContext().getFlash().setKeepMessages(true) before the redirect.&lt;br /&gt;&lt;br /&gt;Is there something that I overlooked? I`m using Liferay 6.1 + LiferayFaces 3.1.0-rc2 + JSF 2.1.3-b02.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;   Robson</summary>
    <dc:creator>Robson Miranda</dc:creator>
    <dc:date>2012-08-02T20:54:47Z</dc:date>
  </entry>
</feed>
