public abstract class FacesContextWrapper extends FacesContext implements FacesWrapper<FacesContext>
Constructor and Description |
---|
FacesContextWrapper()
Deprecated.
|
FacesContextWrapper(FacesContext delegate) |
getCurrentInstance, setCurrentInstance
@Deprecated public FacesContextWrapper()
public FacesContextWrapper(FacesContext delegate)
public void addMessage(String clientId, FacesMessage message)
addMessage
in class FacesContext
public Application getApplication()
getApplication
in class FacesContext
public Map<Object,Object> getAttributes()
getAttributes
in class FacesContext
public Iterator<String> getClientIdsWithMessages()
getClientIdsWithMessages
in class FacesContext
public PhaseId getCurrentPhaseId()
getCurrentPhaseId
in class FacesContext
public javax.el.ELContext getELContext()
FacesContext
A 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 FacesContext
public ExceptionHandler getExceptionHandler()
getExceptionHandler
in class FacesContext
public ExternalContext getExternalContext()
getExternalContext
in class FacesContext
public FacesMessage.Severity getMaximumSeverity()
getMaximumSeverity
in class FacesContext
public List<FacesMessage> getMessageList()
getMessageList
in class FacesContext
public List<FacesMessage> getMessageList(String clientId)
getMessageList
in class FacesContext
public Iterator<FacesMessage> getMessages()
getMessages
in class FacesContext
public Iterator<FacesMessage> getMessages(String clientId)
getMessages
in class FacesContext
public PartialViewContext getPartialViewContext()
FacesContext
Return 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 FacesContext
public RenderKit getRenderKit()
getRenderKit
in class FacesContext
public boolean getRenderResponse()
getRenderResponse
in class FacesContext
public boolean getResponseComplete()
getResponseComplete
in class FacesContext
public ResponseStream getResponseStream()
getResponseStream
in class FacesContext
public ResponseWriter getResponseWriter()
getResponseWriter
in class FacesContext
public boolean isValidationFailed()
isValidationFailed
in class FacesContext
public UIViewRoot getViewRoot()
getViewRoot
in class FacesContext
public FacesContext getWrapped()
FacesWrapper
getWrapped
in interface FacesWrapper<FacesContext>
public boolean isPostback()
isPostback
in class FacesContext
public boolean isProcessingEvents()
isProcessingEvents
in class FacesContext
public void release()
release
in class FacesContext
public void renderResponse()
renderResponse
in class FacesContext
public void responseComplete()
responseComplete
in class FacesContext
public void setCurrentPhaseId(PhaseId currentPhaseId)
setCurrentPhaseId
in class FacesContext
public void setExceptionHandler(ExceptionHandler exceptionHandler)
setExceptionHandler
in class FacesContext
public void setProcessingEvents(boolean processingEvents)
setProcessingEvents
in class FacesContext
public void setResponseStream(ResponseStream responseStream)
setResponseStream
in class FacesContext
public void setResponseWriter(ResponseWriter responseWriter)
setResponseWriter
in class FacesContext
public void setViewRoot(UIViewRoot root)
setViewRoot
in class FacesContext
public void validationFailed()
validationFailed
in class FacesContext
public boolean isProjectStage(ProjectStage stage)
isProjectStage
in class FacesContext
public boolean isReleased()
isReleased
in class FacesContext
public char getNamingContainerSeparatorChar()
getNamingContainerSeparatorChar
in class FacesContext
public void setResourceLibraryContracts(List<String> contracts)
setResourceLibraryContracts
in class FacesContext
public List<String> getResourceLibraryContracts()
getResourceLibraryContracts
in class FacesContext
Copyright © 2020 The Apache Software Foundation. All rights reserved.