- java.lang.Object
- 
- jakarta.faces.context.ExternalContext
- 
- jakarta.faces.context.ExternalContextWrapper
- 
- org.omnifaces.context.OmniExternalContext
 
 
 
- 
- All Implemented Interfaces:
- FacesWrapper<ExternalContext>
 
 public class OmniExternalContext extends ExternalContextWrapper OmniFaces external context. This external context performs the following tasks:- Since 2.2: Take care that the Flashwill 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:
- OmniExternalContextFactory
 
- 
- 
Field Summary- 
Fields inherited from class jakarta.faces.context.ExternalContextBASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
 
- 
 - 
Constructor SummaryConstructors Constructor Description OmniExternalContext(ExternalContext wrapped)Construct a new OmniFaces external context around the given wrapped external context.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description FlashgetFlash()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.ExternalContextWrapperaddResponseCookie, 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, responseFlushBuffer, responseReset, responseSendError, setClientWindow, setRequest, setRequestCharacterEncoding, setResponse, setResponseBufferSize, setResponseCharacterEncoding, setResponseContentLength, setResponseContentType, setResponseHeader, setResponseStatus, setSessionMaxInactiveInterval
 
- 
 
- 
- 
- 
Constructor Detail- 
OmniExternalContextpublic OmniExternalContext(ExternalContext wrapped) Construct a new OmniFaces external context around the given wrapped external context.- Parameters:
- wrapped- The wrapped external context.
 
 
- 
 - 
Method Detail- 
getFlashpublic Flash 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:
- getFlashin class- ExternalContextWrapper
 
 
- 
 
-