java.lang.Object
jakarta.faces.context.ExternalContext
jakarta.faces.context.ExternalContextWrapper
org.omnifaces.context.OmniExternalContext
- All Implemented Interfaces:
FacesWrapper<ExternalContext>
OmniFaces external context.
This external context performs the following tasks:
- Since 2.2: Take care that the
Flash
will be ignored during an unload request. - Since 3.9: If
Faces.isSessionNew()
andHacks.isMojarraUsed()
then return patched flash which work arounds Mojarra issue 4431
- Since:
- 2.2
- Author:
- Bauke Scholtz
- See Also:
-
Field Summary
Fields inherited from class jakarta.faces.context.ExternalContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Constructor Summary
ConstructorsConstructorDescriptionOmniExternalContext
(ExternalContext wrapped) Construct a new OmniFaces external context around the given wrapped external context. -
Method Summary
Modifier and TypeMethodDescriptiongetFlash()
If the current request is an unload request fromViewScoped
, 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.Methods inherited from class jakarta.faces.context.ExternalContextWrapper
addResponseCookie, addResponseHeader, dispatch, encodeActionURL, encodeBookmarkableURL, encodeNamespace, encodePartialActionURL, encodeRedirectURL, encodeResourceURL, encodeWebsocketURL, getApplicationContextPath, getApplicationMap, getAuthType, getClientWindow, getContext, getContextName, getInitParameter, getInitParameterMap, getMimeType, getRealPath, getRemoteUser, getRequest, getRequestCharacterEncoding, getRequestContentLength, getRequestContentType, getRequestContextPath, getRequestCookieMap, getRequestHeaderMap, getRequestHeaderValuesMap, getRequestLocale, getRequestLocales, getRequestMap, getRequestParameterMap, getRequestParameterNames, getRequestParameterValuesMap, getRequestPathInfo, getRequestScheme, getRequestServerName, getRequestServerPort, getRequestServletPath, getResource, getResourceAsStream, getResourcePaths, getResponse, getResponseBufferSize, getResponseCharacterEncoding, getResponseContentType, getResponseOutputStream, getResponseOutputWriter, getSession, getSessionId, getSessionMap, getSessionMaxInactiveInterval, getUserPrincipal, getWrapped, invalidateSession, isResponseCommitted, isSecure, isUserInRole, log, log, redirect, release, responseFlushBuffer, responseReset, responseSendError, setClientWindow, setRequest, setRequestCharacterEncoding, setResponse, setResponseBufferSize, setResponseCharacterEncoding, setResponseContentLength, setResponseContentLengthLong, setResponseContentType, setResponseHeader, setResponseStatus, setSessionMaxInactiveInterval
-
Constructor Details
-
OmniExternalContext
Construct a new OmniFaces external context around the given wrapped external context.- Parameters:
wrapped
- The wrapped external context.
-
-
Method Details
-
getFlash
If the current request is an unload request fromViewScoped
, 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 classExternalContextWrapper
-