Class OmniExternalContext

All Implemented Interfaces:
FacesWrapper<ExternalContext>

public class OmniExternalContext extends ExternalContextWrapper
OmniFaces external context. This external context performs the following tasks:
  1. Since 2.2: Take care that the Flash will be ignored during an unload request.
  2. Since 3.9: If Faces.isSessionNew() and Hacks.isMojarraUsed() then return patched flash which work arounds Mojarra issue 4431
Since:
2.2
Author:
Bauke Scholtz
See Also:
  • Constructor Details

    • OmniExternalContext

      public OmniExternalContext(ExternalContext wrapped)
      Construct a new OmniFaces external context around the given wrapped external context.
      Parameters:
      wrapped - The wrapped external context.
  • Method Details

    • getFlash

      public Flash getFlash()
      If the current request is an unload request from ViewScoped, then return a dummy flash scope which does not modify the flash state, else if Mojarra is used and session is new, then return a patched flash which work arounds Mojarra issue 4431, else return the original flash scope.
      Overrides:
      getFlash in class ExternalContextWrapper