Class FacesContextWrapper
- All Implemented Interfaces:
FacesWrapper<FacesContext>
- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(String clientId, FacesMessage message) jakarta.el.ELContextReturn the context within which all EL-expressions are evaluated.getMessageList(String clientId) getMessages(String clientId) charReturn the PartialViewContext for this request.booleanbooleanA class that implements this interface uses this method to return an instance of the class being wrapped.booleanbooleanbooleanisProjectStage(ProjectStage stage) booleanbooleanvoidrelease()voidvoidvoidsetCurrentPhaseId(PhaseId currentPhaseId) voidsetExceptionHandler(ExceptionHandler exceptionHandler) voidsetProcessingEvents(boolean processingEvents) voidsetResourceLibraryContracts(List<String> contracts) voidsetResponseStream(ResponseStream responseStream) voidsetResponseWriter(ResponseWriter responseWriter) voidsetViewRoot(UIViewRoot root) voidMethods inherited from class jakarta.faces.context.FacesContext
getCurrentInstance, setCurrentInstance
-
Constructor Details
-
FacesContextWrapper
Deprecated. -
FacesContextWrapper
-
-
Method Details
-
addMessage
- Specified by:
addMessagein classFacesContext
-
getApplication
- Specified by:
getApplicationin classFacesContext
-
getAttributes
- Overrides:
getAttributesin classFacesContext- Returns:
-
getClientIdsWithMessages
- Specified by:
getClientIdsWithMessagesin classFacesContext
-
getCurrentPhaseId
- Overrides:
getCurrentPhaseIdin classFacesContext- Returns:
-
getELContext
public jakarta.el.ELContext getELContext()Description copied from class:FacesContextReturn the context within which all EL-expressions are evaluated.A Faces implementation is expected to provide a full implementation of this class. However Faces also explicitly allows user code to apply the "decorator" pattern to this type, by overriding the FacesContextFactory class. In that pattern, the decorating class has a reference to an "underlying" implementation and forward calls to it, possibly after taking other related actions.
The decorator pattern does have difficulties with backwards-compatibility when new methods are added to the class being decorated, as with this method which was added in Faces1.2. Decorator classes that were written for Faces1.1 will subclass this class, but will not override this method to pass the call on to the "underlying" instance. This base implementation therefore must do that for it.
Unfortunately the Faces designers stuffed up the design; this base class has no way of knowing what the "underlying" instance is! The current implementation here is therefore to delegate directly to the very first FacesContext instance registered within this request (via setCurrentInstance). This instance should be the "full" implementation provided by the Faces framework. The drawback is that when any decorator class is present which defaults to this base implementation, then any following decorator instances that do override this method do not get it invoked.
It is believed that the Sun Faces implementation (Mojarra) does something similar.
- Overrides:
getELContextin classFacesContext
-
getExceptionHandler
- Overrides:
getExceptionHandlerin classFacesContext- Returns:
-
getExternalContext
- Specified by:
getExternalContextin classFacesContext
-
getMaximumSeverity
- Specified by:
getMaximumSeverityin classFacesContext
-
getMessageList
- Overrides:
getMessageListin classFacesContext- Returns:
-
getMessageList
- Overrides:
getMessageListin classFacesContext- Returns:
-
getMessages
- Specified by:
getMessagesin classFacesContext
-
getMessages
- Specified by:
getMessagesin classFacesContext
-
getPartialViewContext
Description copied from class:FacesContextReturn the PartialViewContext for this request. The PartialViewContext is used to control the processing of specified components during the execute portion of the request processing lifecycle (known as partial processing) and the rendering of specified components (known as partial rendering). This method must return a new PartialViewContext if one does not already exist.
- Overrides:
getPartialViewContextin classFacesContext- Returns:
- The PartialViewContext
-
getRenderKit
- Specified by:
getRenderKitin classFacesContext
-
getRenderResponse
public boolean getRenderResponse()- Specified by:
getRenderResponsein classFacesContext
-
getResponseComplete
public boolean getResponseComplete()- Specified by:
getResponseCompletein classFacesContext
-
getResponseStream
- Specified by:
getResponseStreamin classFacesContext
-
getResponseWriter
- Specified by:
getResponseWriterin classFacesContext
-
isValidationFailed
public boolean isValidationFailed()- Overrides:
isValidationFailedin classFacesContext- Returns:
-
getViewRoot
- Specified by:
getViewRootin classFacesContext
-
getWrapped
Description copied from interface:FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.- Specified by:
getWrappedin interfaceFacesWrapper<FacesContext>- Returns:
- the instance of the class being wrapped
-
isPostback
public boolean isPostback()- Overrides:
isPostbackin classFacesContext- Returns:
-
isProcessingEvents
public boolean isProcessingEvents()- Overrides:
isProcessingEventsin classFacesContext- Returns:
-
release
public void release()- Specified by:
releasein classFacesContext
-
renderResponse
public void renderResponse()- Specified by:
renderResponsein classFacesContext
-
responseComplete
public void responseComplete()- Specified by:
responseCompletein classFacesContext
-
setCurrentPhaseId
- Overrides:
setCurrentPhaseIdin classFacesContext
-
setExceptionHandler
- Overrides:
setExceptionHandlerin classFacesContext
-
setProcessingEvents
public void setProcessingEvents(boolean processingEvents) - Overrides:
setProcessingEventsin classFacesContext
-
setResponseStream
- Specified by:
setResponseStreamin classFacesContext
-
setResponseWriter
- Specified by:
setResponseWriterin classFacesContext
-
setViewRoot
- Specified by:
setViewRootin classFacesContext
-
validationFailed
public void validationFailed()- Overrides:
validationFailedin classFacesContext
-
isProjectStage
- Overrides:
isProjectStagein classFacesContext
-
isReleased
public boolean isReleased()- Overrides:
isReleasedin classFacesContext- Returns:
-
getNamingContainerSeparatorChar
public char getNamingContainerSeparatorChar()- Overrides:
getNamingContainerSeparatorCharin classFacesContext- Returns:
-
setResourceLibraryContracts
- Overrides:
setResourceLibraryContractsin classFacesContext
-
getResourceLibraryContracts
- Overrides:
getResourceLibraryContractsin classFacesContext- Returns:
-
getLifecycle
- Specified by:
getLifecyclein classFacesContext- Returns:
- Since:
- 4.0
-