ICEfaces
  1. ICEfaces
  2. ICE-10554

Persisting FacesMessages on redirect or push update

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P02, 4.0
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      All

      Description

      With JSF the FacesMessages are request based so that they are cleared on each request. With ICEfaces we persist the messages to last over ajax updates.

      A customer has a requirement to persist the messages over a redirect navigation. There is a PhaseListener workaround that is available online which helps to persist the messages over the redirect.

      A few issues are seen with this, after the redirect, if a push updates is received, the messages are cleared. With a change to the PhaseListener it keeps these messages and restores them from the session map. The draw back to this is that the messages are always shown unless manually removed from the map.

      It would be interesting to see if the ICEfaces message persistence could be enhanced to allow persistence over a redirect navigation.
      1. Case13332ExampleICE.zip
        25 kB
        Arran Mccullough
      2. MultiPageMessagesSupport.java
        5 kB
        Mircea Toma

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case source code that shows the PhaseListener in action. A runnable war file can be provided if needed.

        Show
        Arran Mccullough added a comment - Attached test case source code that shows the PhaseListener in action. A runnable war file can be provided if needed.
        Hide
        Ken Fyten added a comment -

        I'm assuming that if this could be enabled it would need to be configurable somehow such that not ALL redirects would persist messages, but that instead a particular redirect could be specified to persist the messages from the previous page.

        Show
        Ken Fyten added a comment - I'm assuming that if this could be enabled it would need to be configurable somehow such that not ALL redirects would persist messages, but that instead a particular redirect could be specified to persist the messages from the previous page.
        Hide
        Mircea Toma added a comment -

        Uploaded a version of PhaseListener that persists the messages into the map associated with the browser window. This ensure the messages can be restored after a page redirect. Although I'm not sure when exactly we want to have the messages cleared.

        Show
        Mircea Toma added a comment - Uploaded a version of PhaseListener that persists the messages into the map associated with the browser window. This ensure the messages can be restored after a page redirect. Although I'm not sure when exactly we want to have the messages cleared.
        Hide
        Ken Fyten added a comment -

        Note that the phase-listener attached also persists messages after a push update occurs.

        This code won't go into the product bundle, but can be shared with the customer if they'd like to use it in their application.

        Marking this FIXED without a release version.

        Show
        Ken Fyten added a comment - Note that the phase-listener attached also persists messages after a push update occurs. This code won't go into the product bundle, but can be shared with the customer if they'd like to use it in their application. Marking this FIXED without a release version.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: