Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4543

Flash does not Work with ClientWindow mode URL Mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.10, 2.3.10, 2.3-next-M7, 3.0.2, 4.0.0-RC3
    • 4.0.0-RC4
    • None
    • None

    Description

      This bug was discovered in the faces23/TCK

      ee.jakarta.tck.faces.test.javaee8.cdi.Spec1385IT - testInjectFlash.

      In a nutshell, setting an attribute on the flash map and then reloading the page does not work.  This is due to to the fact that the application also contains flows. 
      Flows, by default, requires a active ClientWindow mode and per default its set to URL.

      Flash defaults to use the ClientWIndow id to track the flash tokens, which is then set to URL as default. The URL mode looses the ClientWindow id on the initial request. Therefore we have a url-redirect, or DS and PrimeFaces ClientWindow.

      https://github.com/apache/myfaces/blob/18f1f90cd2bdb22330444f77ff5e98097ed84634/impl/src/main/java/org/apache/myfaces/context/flash/FlashImpl.java#L752-L753

      https://github.com/apache/myfaces/blob/18f1f90cd2bdb22330444f77ff5e98097ed84634/impl/src/main/java/org/apache/myfaces/context/flash/FlashImpl.java#L797-L798

      We could just remove the clientwindow checks (and use flash cookies as in MyFaces 2.0) , but I think it might be better to check if the current configuration requires client window url mode. If so, just use flash cookies instead.

      Attachments

        Issue Links

          Activity

            People

              volosied Volodymyr Siedlecki
              volosied Volodymyr Siedlecki
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: