public abstract class NoOpFacesContext
extends javax.faces.context.FacesContext
| Constructor and Description |
|---|
NoOpFacesContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(String clientId,
javax.faces.application.FacesMessage message)
Append a
FacesMessage to the set of messages associated with
the specified client identifier, if clientId is
not null. |
Iterator<String> |
getClientIdsWithMessages()
Return an
Iterator over the client identifiers for
which at least one FacesMessage has been queued. |
javax.faces.application.FacesMessage.Severity |
getMaximumSeverity()
Return the maximum severity level recorded on any
FacesMessages that has been queued, whether or not they are
associated with any specific UIComponent. |
List<javax.faces.application.FacesMessage> |
getMessageList()
Like |
List<javax.faces.application.FacesMessage> |
getMessageList(String clientId)
Like |
Iterator<javax.faces.application.FacesMessage> |
getMessages()
Return an
Iterator over the FacesMessages
that have been queued, whether or not they are associated with any
specific client identifier. |
Iterator<javax.faces.application.FacesMessage> |
getMessages(String clientId)
Return an
Iterator over the FacesMessages that
have been queued that are associated with the specified client identifier
(if clientId is not null), or over the
FacesMessages that have been queued that are not associated with
any specific client identifier (if clientId is
null). |
javax.faces.render.RenderKit |
getRenderKit()
Return the
RenderKit instance for the render kit identifier
specified on our UIViewRoot, if there is one. |
boolean |
getRenderResponse()
Return
true if the renderResponse()
method has been called for the current request. |
boolean |
getResponseComplete()
Return
true if the responseComplete()
method has been called for the current request. |
javax.faces.context.ResponseStream |
getResponseStream()
Return the
ResponseStream to which components should
direct their binary output. |
javax.faces.context.ResponseWriter |
getResponseWriter()
Return the
ResponseWriter to which components should
direct their character-based output. |
boolean |
isValidationFailed()
Return |
void |
renderResponse()
Signal the Jakarta Server Faces implementation that, as soon as the
current phase of the request processing lifecycle has been completed,
control should be passed to the Render Response phase,
bypassing any phases that have not been executed yet.
|
void |
responseComplete()
Signal the Jakarta Server Faces implementation that the HTTP response
for this request has already been generated (such as an HTTP redirect),
and that the request processing lifecycle should be terminated as soon
as the current phase is completed.
|
void |
setResponseStream(javax.faces.context.ResponseStream responseStream)
Set the
ResponseStream to which components should
direct their binary output. |
void |
setResponseWriter(javax.faces.context.ResponseWriter responseWriter)
Set the
ResponseWriter to which components should
direct their character-based output. |
void |
setViewRoot(javax.faces.component.UIViewRoot root)
Set the root component that is
associated with this request.
|
void |
validationFailed()
Sets a flag which indicates that a conversion or validation error occurred while processing the inputs. |
getApplication, getAttributes, getCurrentInstance, getCurrentPhaseId, getELContext, getExceptionHandler, getExternalContext, getNamingContainerSeparatorChar, getPartialViewContext, getResourceLibraryContracts, getViewRoot, isPostback, isProcessingEvents, isProjectStage, isReleased, release, setCurrentInstance, setCurrentPhaseId, setExceptionHandler, setProcessingEvents, setResourceLibraryContractspublic Iterator<String> getClientIdsWithMessages()
javax.faces.context.FacesContextReturn an Iterator over the client identifiers for
which at least one FacesMessage has been queued. If there are no
such client identifiers, an empty Iterator is returned.
If any messages have been queued that were not associated with any
specific client identifier, a null value will be included
in the iterated values. The elements in the Iterator must
be returned in the order in which they were added with FacesContext.addMessage(java.lang.String, javax.faces.application.FacesMessage).
getClientIdsWithMessages in class javax.faces.context.FacesContextIterator over the client identifiers for
which at least one FacesMessage has been queued.public javax.faces.application.FacesMessage.Severity getMaximumSeverity()
javax.faces.context.FacesContextReturn the maximum severity level recorded on any
FacesMessages that has been queued, whether or not they are
associated with any specific UIComponent. If no such messages
have been queued, return null.
getMaximumSeverity in class javax.faces.context.FacesContextpublic Iterator<javax.faces.application.FacesMessage> getMessages()
javax.faces.context.FacesContextReturn an Iterator over the FacesMessages
that have been queued, whether or not they are associated with any
specific client identifier. If no such messages have been queued,
return an empty Iterator. The elements of the Iterator
must be returned in the order in which they were added with calls to FacesContext.addMessage(java.lang.String, javax.faces.application.FacesMessage).
getMessages in class javax.faces.context.FacesContextIterator over the FacesMessages
that have been queued.public Iterator<javax.faces.application.FacesMessage> getMessages(String clientId)
javax.faces.context.FacesContextReturn an Iterator over the FacesMessages that
have been queued that are associated with the specified client identifier
(if clientId is not null), or over the
FacesMessages that have been queued that are not associated with
any specific client identifier (if clientId is
null). If no such messages have been queued, return an
empty Iterator. The elements of the Iterator
must be returned in the order in which they were added with calls to FacesContext.addMessage(java.lang.String, javax.faces.application.FacesMessage).
getMessages in class javax.faces.context.FacesContextclientId - The client identifier for which messages are
requested, or null for messages not associated with
any client identifierIterator over the FacesMessages.public List<javax.faces.application.FacesMessage> getMessageList()
javax.faces.context.FacesContextLike FacesContext.getMessages(), but
returns a List<FacesMessage>,
enabling use from Jakarta Expression Language expressions.
The default implementation throws
UnsupportedOperationException and is provided
for the sole purpose of not breaking existing applications that extend
this class.
getMessageList in class javax.faces.context.FacesContextList which is effectively a snapshot
of the messages present at the time of invocation.public List<javax.faces.application.FacesMessage> getMessageList(String clientId)
javax.faces.context.FacesContextLike FacesContext.getMessages(java.lang.String), but returns a
List<FacesMessage> of messages for the
component with client id matching argument
clientId.
The default implementation throws
UnsupportedOperationException and is provided
for the sole purpose of not breaking existing applications that extend
this class.
getMessageList in class javax.faces.context.FacesContextclientId - the client id of a component.List which is effectively a snapshot
of the messages present at the time of invocation.public javax.faces.render.RenderKit getRenderKit()
javax.faces.context.FacesContextReturn the RenderKit instance for the render kit identifier
specified on our UIViewRoot, if there is one. If there is no
current UIViewRoot, if the UIViewRoot does not have a
specified renderKitId, or if there is no RenderKit
for the specified identifier, return null instead.
getRenderKit in class javax.faces.context.FacesContextRenderKit associated with the UIViewRoot.public boolean getRenderResponse()
javax.faces.context.FacesContextReturn true if the renderResponse()
method has been called for the current request.
getRenderResponse in class javax.faces.context.FacesContextrenderResponse()
has been called.public boolean getResponseComplete()
javax.faces.context.FacesContextReturn true if the responseComplete()
method has been called for the current request.
getResponseComplete in class javax.faces.context.FacesContextresponseComplete()
method has been called.public boolean isValidationFailed()
javax.faces.context.FacesContextReturn true if the validationFailed()
method has been called for the current request.
isValidationFailed in class javax.faces.context.FacesContextvalidationFailed()
method has been called for the current requestpublic javax.faces.context.ResponseStream getResponseStream()
javax.faces.context.FacesContextReturn the ResponseStream to which components should
direct their binary output. Within a given response, components
can use either the ResponseStream or the ResponseWriter,
but not both.
getResponseStream in class javax.faces.context.FacesContextResponseStream instance.public void setResponseStream(javax.faces.context.ResponseStream responseStream)
javax.faces.context.FacesContextSet the ResponseStream to which components should
direct their binary output.
setResponseStream in class javax.faces.context.FacesContextresponseStream - The new ResponseStream for this responsepublic javax.faces.context.ResponseWriter getResponseWriter()
javax.faces.context.FacesContextReturn the ResponseWriter to which components should
direct their character-based output. Within a given response,
components can use either the ResponseStream or the ResponseWriter,
but not both.
getResponseWriter in class javax.faces.context.FacesContextResponseWriter instance.public void setResponseWriter(javax.faces.context.ResponseWriter responseWriter)
javax.faces.context.FacesContextSet the ResponseWriter to which components should
direct their character-based output.
setResponseWriter in class javax.faces.context.FacesContextresponseWriter - The new ResponseWriter for this responsepublic void setViewRoot(javax.faces.component.UIViewRoot root)
javax.faces.context.FacesContextSet the root component that is associated with this request.
This method can be called by the application handler (or a class that the handler calls), during the Invoke Application phase of the request processing lifecycle and during the Restore View phase of the request processing lifecycle (especially when a new root component is created). In the present version of the specification, implementations are not required to enforce this restriction, though a future version of the specification may require enforcement.
If the current
UIViewRoot is non-null, and calling
equals() on the argument root, passing
the current UIViewRoot returns false,
the clear method must be called on the
Map returned from UIViewRoot.getViewMap().
setViewRoot in class javax.faces.context.FacesContextroot - The new component UIViewRoot componentpublic void addMessage(String clientId, javax.faces.application.FacesMessage message)
javax.faces.context.FacesContextAppend a FacesMessage to the set of messages associated with
the specified client identifier, if clientId is
not null. If clientId is null,
this FacesMessage is assumed to not be associated with any
specific component instance.
addMessage in class javax.faces.context.FacesContextclientId - The client identifier with which this message is
associated (if any)message - The message to be appendedpublic void renderResponse()
javax.faces.context.FacesContextSignal the Jakarta Server Faces implementation that, as soon as the current phase of the request processing lifecycle has been completed, control should be passed to the Render Response phase, bypassing any phases that have not been executed yet.
renderResponse in class javax.faces.context.FacesContextpublic void responseComplete()
javax.faces.context.FacesContextSignal the Jakarta Server Faces implementation that the HTTP response for this request has already been generated (such as an HTTP redirect), and that the request processing lifecycle should be terminated as soon as the current phase is completed.
responseComplete in class javax.faces.context.FacesContextpublic void validationFailed()
javax.faces.context.FacesContextSets a flag which indicates that a conversion or
validation error occurred while processing the inputs. Inputs consist of
either page parameters or form bindings. This flag can be read using
FacesContext.isValidationFailed().
validationFailed in class javax.faces.context.FacesContextCopyright © 2010–2020 JBoss by Red Hat. All rights reserved.