public abstract class FacesContextWrapper extends FacesContext implements FacesWrapper<FacesContext>
| Constructor and Description |
|---|
FacesContextWrapper() |
getCurrentInstance, setCurrentInstancepublic void addMessage(String clientId, FacesMessage message)
addMessage in class FacesContextpublic Application getApplication()
getApplication in class FacesContextpublic Map<Object,Object> getAttributes()
getAttributes in class FacesContextpublic Iterator<String> getClientIdsWithMessages()
getClientIdsWithMessages in class FacesContextpublic PhaseId getCurrentPhaseId()
getCurrentPhaseId in class FacesContextpublic javax.el.ELContext getELContext()
FacesContextA JSF implementation is expected to provide a full implementation of this class. However JSF 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 JSF1.2. Decorator classes that were written for JSF1.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 JSF 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 JSF 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 JSF implementation (Mojarra) does something similar.
getELContext in class FacesContextpublic ExceptionHandler getExceptionHandler()
getExceptionHandler in class FacesContextpublic ExternalContext getExternalContext()
getExternalContext in class FacesContextpublic FacesMessage.Severity getMaximumSeverity()
getMaximumSeverity in class FacesContextpublic List<FacesMessage> getMessageList()
getMessageList in class FacesContextpublic List<FacesMessage> getMessageList(String clientId)
getMessageList in class FacesContextpublic Iterator<FacesMessage> getMessages()
getMessages in class FacesContextpublic Iterator<FacesMessage> getMessages(String clientId)
getMessages in class FacesContextpublic PartialViewContext getPartialViewContext()
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.
getPartialViewContext in class FacesContextpublic RenderKit getRenderKit()
getRenderKit in class FacesContextpublic boolean getRenderResponse()
getRenderResponse in class FacesContextpublic boolean getResponseComplete()
getResponseComplete in class FacesContextpublic ResponseStream getResponseStream()
getResponseStream in class FacesContextpublic ResponseWriter getResponseWriter()
getResponseWriter in class FacesContextpublic boolean isValidationFailed()
isValidationFailed in class FacesContextpublic UIViewRoot getViewRoot()
getViewRoot in class FacesContextpublic abstract FacesContext getWrapped()
FacesWrappergetWrapped in interface FacesWrapper<FacesContext>public boolean isPostback()
isPostback in class FacesContextpublic boolean isProcessingEvents()
isProcessingEvents in class FacesContextpublic void release()
release in class FacesContextpublic void renderResponse()
renderResponse in class FacesContextpublic void responseComplete()
responseComplete in class FacesContextpublic void setCurrentPhaseId(PhaseId currentPhaseId)
setCurrentPhaseId in class FacesContextpublic void setExceptionHandler(ExceptionHandler exceptionHandler)
setExceptionHandler in class FacesContextpublic void setProcessingEvents(boolean processingEvents)
setProcessingEvents in class FacesContextpublic void setResponseStream(ResponseStream responseStream)
setResponseStream in class FacesContextpublic void setResponseWriter(ResponseWriter responseWriter)
setResponseWriter in class FacesContextpublic void setViewRoot(UIViewRoot root)
setViewRoot in class FacesContextpublic void validationFailed()
validationFailed in class FacesContextpublic boolean isProjectStage(ProjectStage stage)
isProjectStage in class FacesContextpublic boolean isReleased()
isReleased in class FacesContextpublic char getNamingContainerSeparatorChar()
getNamingContainerSeparatorChar in class FacesContextpublic void setResourceLibraryContracts(List<String> contracts)
setResourceLibraryContracts in class FacesContextpublic List<String> getResourceLibraryContracts()
getResourceLibraryContracts in class FacesContextCopyright © 2021 The Apache Software Foundation. All rights reserved.