Top Constructors Methods
com.sun.faces.config.initfacescontext

public abstract Class NoOpFacesContext

extends FacesContext
Class Inheritance
Known Direct Subclasses
com.sun.faces.config.InitFacesContext
Static Imports
java.util.Collections.emptyList

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addMessage(String
The client identifier with which this message is associated (if any)
clientId
,
FacesMessage
The message to be appended
message
)

Implements abstract javax.faces.context.FacesContext.addMessage.

Append a javax.faces.application.FacesMessage to the set of messages associated with the specified client identifier, if clientId is not null.

public Iterator<String>
getClientIdsWithMessages()

Implements abstract javax.faces.context.FacesContext.getClientIdsWithMessages.

Return an Iterator over the client identifiers for which at least one javax.faces.application.FacesMessage has been queued.

public FacesMessage.Severity
getMaximumSeverity()

Implements abstract javax.faces.context.FacesContext.getMaximumSeverity.

Return the maximum severity level recorded on any javax.faces.application.FacesMessages that has been queued, whether or not they are associated with any specific javax.faces.component.UIComponent.

public List<FacesMessage>
getMessageList()

Overrides javax.faces.context.FacesContext.getMessageList.

Like getMessages, but returns a List<FacesMessage>, enabling use from EL expressions.

public List<FacesMessage>
getMessageList(String
the client id of a component.
clientId
)

Overrides javax.faces.context.FacesContext.getMessageList.

Like getMessages(java.lang.String), but returns a List<FacesMessage> of messages for the component with client id matching argument clientId.

public Iterator<FacesMessage>
getMessages()

Implements abstract javax.faces.context.FacesContext.getMessages.

Return an Iterator over the javax.faces.application.FacesMessages that have been queued, whether or not they are associated with any specific client identifier.

public Iterator<FacesMessage>
getMessages(String
The client identifier for which messages are requested, or null for messages not associated with any client identifier
clientId
)

Implements abstract javax.faces.context.FacesContext.getMessages.

Return an Iterator over the javax.faces.application.FacesMessages that have been queued that are associated with the specified client identifier (if clientId is not null), or over the javax.faces.application.FacesMessages that have been queued that are not associated with any specific client identifier (if clientId is null).

public RenderKit
getRenderKit()

Implements abstract javax.faces.context.FacesContext.getRenderKit.

Return the RenderKit instance for the render kit identifier specified on our UIViewRoot, if there is one.

public boolean
getRenderResponse()

Implements abstract javax.faces.context.FacesContext.getRenderResponse.

Return true if the renderResponse() method has been called for the current request.

public boolean
getResponseComplete()

Implements abstract javax.faces.context.FacesContext.getResponseComplete.

Return true if the responseComplete() method has been called for the current request.

public ResponseStream
getResponseStream()

Implements abstract javax.faces.context.FacesContext.getResponseStream.

Return the ResponseStream to which components should direct their binary output.

public ResponseWriter
getResponseWriter()

Implements abstract javax.faces.context.FacesContext.getResponseWriter.

Return the ResponseWriter to which components should direct their character-based output.

public boolean
isValidationFailed()

Overrides javax.faces.context.FacesContext.isValidationFailed.

Return true if the validationFailed() method has been called for the current request.

public void
renderResponse()

Implements abstract javax.faces.context.FacesContext.renderResponse.

Signal the JavaServer 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.

public void
responseComplete()

Implements abstract javax.faces.context.FacesContext.responseComplete.

Signal the JavaServer 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.

public void
setResponseStream(ResponseStream
The new ResponseStream for this response
responseStream
)

Implements abstract javax.faces.context.FacesContext.setResponseStream.

Set the ResponseStream to which components should direct their binary output.

public void
setResponseWriter(ResponseWriter
The new ResponseWriter for this response
responseWriter
)

Implements abstract javax.faces.context.FacesContext.setResponseWriter.

Set the ResponseWriter to which components should direct their character-based output.

public void
setViewRoot(UIViewRoot
The new component UIViewRoot component
root
)

Implements abstract javax.faces.context.FacesContext.setViewRoot.

Set the root component that is associated with this request.

public void
validationFailed()

Overrides javax.faces.context.FacesContext.validationFailed.

Sets a flag which indicates that a conversion or validation error occurred while processing the inputs.

Inherited from javax.faces.context.FacesContext:
getApplicationgetAttributesgetCurrentInstancegetCurrentPhaseIdgetELContextgetExceptionHandlergetExternalContextgetNamingContainerSeparatorChargetPartialViewContextgetResourceLibraryContractsgetViewRootisPostbackisProcessingEventsisProjectStageisReleasedreleasesetCurrentInstancesetCurrentPhaseIdsetExceptionHandlersetProcessingEventssetResourceLibraryContracts

Constructor Detail

NoOpFacesContextback to summary
public NoOpFacesContext()

Method Detail

addMessageback to summary
public void addMessage(String clientId, FacesMessage message)

Implements abstract javax.faces.context.FacesContext.addMessage.

Doc from javax.faces.context.FacesContext.addMessage.

Append a javax.faces.application.FacesMessage to the set of messages associated with the specified client identifier, if clientId is not null. If clientId is null, this javax.faces.application.FacesMessage is assumed to not be associated with any specific component instance.

Parameters
clientId:String

The client identifier with which this message is associated (if any)

message:FacesMessage

The message to be appended

Annotations
@Override
getClientIdsWithMessagesback to summary
public Iterator<String> getClientIdsWithMessages()

Implements abstract javax.faces.context.FacesContext.getClientIdsWithMessages.

Doc from javax.faces.context.FacesContext.getClientIdsWithMessages.

Return an Iterator over the client identifiers for which at least one javax.faces.application.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 addMessage.

Returns:Iterator<String>

the Iterator over the client identifiers for which at least one javax.faces.application.FacesMessage has been queued.

Annotations
@Override
getMaximumSeverityback to summary
public FacesMessage.Severity getMaximumSeverity()

Implements abstract javax.faces.context.FacesContext.getMaximumSeverity.

Doc from javax.faces.context.FacesContext.getMaximumSeverity.

Return the maximum severity level recorded on any javax.faces.application.FacesMessages that has been queued, whether or not they are associated with any specific javax.faces.component.UIComponent. If no such messages have been queued, return null.

Returns:FacesMessage.Severity

the maximum severity level.

Annotations
@Override
getMessageListback to summary
public List<FacesMessage> getMessageList()

Overrides javax.faces.context.FacesContext.getMessageList.

Doc from javax.faces.context.FacesContext.getMessageList.

Like getMessages, but returns a List<FacesMessage>, enabling use from EL expressions.

The default implementation throws UnsupportedOperationException and is provided for the sole purpose of not breaking existing applications that extend this class.

Returns:List<FacesMessage>

an immutable List which is effectively a snapshot of the messages present at the time of invocation.

Annotations
@Override
getMessageListback to summary
public List<FacesMessage> getMessageList(String clientId)

Overrides javax.faces.context.FacesContext.getMessageList.

Doc from javax.faces.context.FacesContext.getMessageList.

Like 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.

Parameters
clientId:String

the client id of a component.

Returns:List<FacesMessage>

an immutable List which is effectively a snapshot of the messages present at the time of invocation.

Annotations
@Override
getMessagesback to summary
public Iterator<FacesMessage> getMessages()

Implements abstract javax.faces.context.FacesContext.getMessages.

Doc from javax.faces.context.FacesContext.getMessages.

Return an Iterator over the javax.faces.application.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 addMessage.

Returns:Iterator<FacesMessage>

Iterator over the FacesMessages that have been queued.

Annotations
@Override
getMessagesback to summary
public Iterator<FacesMessage> getMessages(String clientId)

Implements abstract javax.faces.context.FacesContext.getMessages.

Doc from javax.faces.context.FacesContext.getMessages.

Return an Iterator over the javax.faces.application.FacesMessages that have been queued that are associated with the specified client identifier (if clientId is not null), or over the javax.faces.application.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 addMessage.

Parameters
clientId:String

The client identifier for which messages are requested, or null for messages not associated with any client identifier

Returns:Iterator<FacesMessage>

Iterator over the FacesMessages.

Annotations
@Override
getRenderKitback to summary
public RenderKit getRenderKit()

Implements abstract javax.faces.context.FacesContext.getRenderKit.

Doc from javax.faces.context.FacesContext.getRenderKit.

Return 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.

Returns:RenderKit

instance of RenderKit associated with the UIViewRoot.

Annotations
@Override
getRenderResponseback to summary
public boolean getRenderResponse()

Implements abstract javax.faces.context.FacesContext.getRenderResponse.

Doc from javax.faces.context.FacesContext.getRenderResponse.

Return true if the renderResponse() method has been called for the current request.

Returns:boolean

flag indicating whether the renderResponse() has been called.

Annotations
@Override
getResponseCompleteback to summary
public boolean getResponseComplete()

Implements abstract javax.faces.context.FacesContext.getResponseComplete.

Doc from javax.faces.context.FacesContext.getResponseComplete.

Return true if the responseComplete() method has been called for the current request.

Returns:boolean

the boolean indicating whether responseComplete() method has been called.

Annotations
@Override
getResponseStreamback to summary
public ResponseStream getResponseStream()

Implements abstract javax.faces.context.FacesContext.getResponseStream.

Doc from javax.faces.context.FacesContext.getResponseStream.

Return 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.

Returns:ResponseStream

ResponseStream instance.

Annotations
@Override
getResponseWriterback to summary
public ResponseWriter getResponseWriter()

Implements abstract javax.faces.context.FacesContext.getResponseWriter.

Doc from javax.faces.context.FacesContext.getResponseWriter.

Return 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.

Returns:ResponseWriter

ResponseWriter instance.

Annotations
@Override
isValidationFailedback to summary
public boolean isValidationFailed()

Overrides javax.faces.context.FacesContext.isValidationFailed.

Doc from javax.faces.context.FacesContext.isValidationFailed.

Return true if the validationFailed() method has been called for the current request.

Returns:boolean

boolean indicating if the validationFailed() method has been called for the current request

Annotations
@Override
renderResponseback to summary
public void renderResponse()

Implements abstract javax.faces.context.FacesContext.renderResponse.

Doc from javax.faces.context.FacesContext.renderResponse.

Signal the JavaServer 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.

Annotations
@Override
responseCompleteback to summary
public void responseComplete()

Implements abstract javax.faces.context.FacesContext.responseComplete.

Doc from javax.faces.context.FacesContext.responseComplete.

Signal the JavaServer 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.

Annotations
@Override
setResponseStreamback to summary
public void setResponseStream(ResponseStream responseStream)

Implements abstract javax.faces.context.FacesContext.setResponseStream.

Doc from javax.faces.context.FacesContext.setResponseStream.

Set the ResponseStream to which components should direct their binary output.

Parameters
responseStream:ResponseStream

The new ResponseStream for this response

Annotations
@Override
setResponseWriterback to summary
public void setResponseWriter(ResponseWriter responseWriter)

Implements abstract javax.faces.context.FacesContext.setResponseWriter.

Doc from javax.faces.context.FacesContext.setResponseWriter.

Set the ResponseWriter to which components should direct their character-based output.

Parameters
responseWriter:ResponseWriter

The new ResponseWriter for this response

Annotations
@Override
setViewRootback to summary
public void setViewRoot(UIViewRoot root)

Implements abstract javax.faces.context.FacesContext.setViewRoot.

Doc from javax.faces.context.FacesContext.setViewRoot.

Set 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.

Parameters
root:UIViewRoot

The new component UIViewRoot component

Annotations
@Override
validationFailedback to summary
public void validationFailed()

Overrides javax.faces.context.FacesContext.validationFailed.

Doc from javax.faces.context.FacesContext.validationFailed.

Sets 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 isValidationFailed.

Annotations
@Override