Top Description Fields Constructors Methods
jakarta.faces.context

public abstract Class FacesContext

extends Object
Class Inheritance
Known Direct Subclasses
jakarta.faces.context.FacesContextWrapper
Imports
java.util.Collections, .HashMap, .Iterator, .List, .Map, java.util.concurrent.ConcurrentHashMap, jakarta.el.ELContext, jakarta.faces.FactoryFinder, jakarta.faces.application.Application, .FacesMessage, .FacesMessage.Severity, .ProjectStage, jakarta.faces.component.UINamingContainer, .UIViewRoot, jakarta.faces.event.PhaseId, jakarta.faces.lifecycle.Lifecycle, jakarta.faces.render.RenderKit

FacesContext contains all of the per-request state information related to the processing of a single Jakarta Faces request, and the rendering of the corresponding response. It is passed to, and potentially modified by, each phase of the request processing lifecycle.

A FacesContext instance is associated with a particular request at the beginning of request processing, by a call to the getFacesContext() method of the FacesContextFactory instance associated with the current web application. The instance remains active until its release() method is called, after which no further references to this instance are allowed. While a FacesContext instance is active, it must not be referenced from any thread other than the one upon which the Jakarta Servlet container executing this web application utilizes for the processing of this request.

A FacesContext can be injected into a request scoped bean using @Inject FacesContext facesContext;

Field Summary

Modifier and TypeField and Description
private Map<Object, Object>
private PhaseId
private FacesContext
private static ConcurrentHashMap<K, V>
private static ThreadLocal<FacesContext>
instance

The ThreadLocal variable used to record the FacesContext instance for each processing thread.

private boolean
private PartialViewContext
private boolean
private static ConcurrentHashMap<K, V>

Constructor Summary

AccessConstructor and Description
public
FacesContext()

Default constructor.

Method Summary

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

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

public abstract Application

Returns:

the Application instance associated with this web application.
getApplication
()

Return the Application instance associated with this web application.

public Map<Object, Object>

Returns:

mutable Map representing the attributes associated wth this FacesContext instance.
getAttributes
()

Return a mutable Map representing the attributes associated wth this FacesContext instance.

public abstract Iterator<String>

Returns:

the Iterator over the client identifiers for which at least one jakarta.faces.application.FacesMessage has been queued.
getClientIdsWithMessages
()

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

public static FacesContext

Returns:

the instance of FacesContext.
getCurrentInstance
()

Return the FacesContext instance for the request that is being processed by the current thread.

public PhaseId

Returns:

the current phase id.
getCurrentPhaseId
()

Return the value last set on this FacesContext instance when setCurrentPhaseId was called.

public ELContext

Returns:

instance of ELContext.
getELContext
()

Return the ELContext instance for this FacesContext instance.

public ExceptionHandler

Returns:

instance of ExceptionHandler.
getExceptionHandler
()

Return the ExceptionHandler for this request.

public abstract ExternalContext

Returns:

instance of ExternalContext
getExternalContext
()

Return the ExternalContext instance for this FacesContext instance.

public abstract Lifecycle

Returns:

instance of Lifecycle
getLifecycle
()

Return the Lifecycle instance for this FacesContext instance.

public abstract FacesMessage.Severity

Returns:

the maximum severity level.
getMaximumSeverity
()

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

public List<FacesMessage>

Returns:

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

Like getMessages, but returns a List<FacesMessage>, enabling use from Jakarta Expression Language expressions.

public List<FacesMessage>

Returns:

an immutable List which is effectively a snapshot of the messages present at the time of invocation.
getMessageList
(String
the client id of a component.
clientId
)

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

public abstract Iterator<FacesMessage>

Returns:

Iterator over the FacesMessages that have been queued.
getMessages
()

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

public abstract Iterator<FacesMessage>

Returns:

Iterator over the FacesMessages.
getMessages
(String
The client identifier for which messages are requested, or null for messages not associated with any client identifier
clientId
)

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

public char

Returns:

the separator char.
getNamingContainerSeparatorChar
()

Return the result of calling UINamingContainer#getSeparatorChar, passing this as the argument.

public PartialViewContext

Returns:

the instance of PartialViewContext for this request.
getPartialViewContext
()

Return the PartialViewContext for this request.

public abstract RenderKit

Returns:

instance of RenderKit associated with the UIViewRoot.
getRenderKit
()

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

public abstract boolean

Returns:

flag indicating whether the renderResponse() has been called.
getRenderResponse
()

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

public List<String>

Returns:

the list of resource library contracts.
getResourceLibraryContracts
()

Return the list of resource library contracts that have been calculated to be appropriate for use with this view, or an empty list if there are no such resource library contracts.

public abstract boolean

Returns:

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

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

public abstract ResponseStream

Returns:

ResponseStream instance.
getResponseStream
()

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

public abstract ResponseWriter

Returns:

ResponseWriter instance.
getResponseWriter
()

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

public abstract UIViewRoot

Returns:

UIViewRoot instance.
getViewRoot
()

Return the root component that is associated with the this request.

public boolean

Returns:

the boolean indicating whether this request is a post one.
isPostback
()

This utility method simply returns the result of jakarta.faces.render.ResponseStateManager#isPostback(FacesContext).

public boolean

Returns:

true if events should be published, otherwise false
isProcessingEvents
()

Returns a flag indicating whether or not the runtime should publish events when asked to do so.

public boolean

Returns:

boolean indicating whether the application has the same stage.
isProjectStage
(ProjectStage
the ProjectStage to check
stage
)

Return true if the current ProjectStage as returned by the Application instance is equal to stage, otherwise return false

public boolean

Returns:

true if the resources have been released.
isReleased
()

Return a flag indicating if the resources associated with this FacesContext instance have been released.

public boolean

Returns:

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

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

public abstract void
release()

Release any resources associated with this FacesContext instance.

public abstract void
renderResponse()

Signal the Jakarta 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 abstract void
responseComplete()

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

protected static void
setCurrentInstance(FacesContext
The FacesContext instance for the current thread, or null if this thread no longer has a FacesContext instance.
context
)

Set the FacesContext instance for the request that is being processed by the current thread.

public void
setCurrentPhaseId(PhaseId
The jakarta.faces.event.PhaseId for the current phase.
currentPhaseId
)

The implementation must call this method at the earliest possble point in time after entering into a new phase in the request processing lifecycle.

public void
setExceptionHandler(ExceptionHandler
the ExceptionHandler for this request.
exceptionHandler
)

Set the ExceptionHandler for this request.

public void
setProcessingEvents(boolean
flag indicating events should be processed or not
processingEvents
)

Allows control of wheter or not the runtime will publish events when Application#publishEvent(FacesContext, Class, Object) or Application#publishEvent(FacesContext, Class, Class, Object) is called.

public void
setResourceLibraryContracts(List<String>
The new contracts to be returned, as an immutable List. from a subsequent call to getResourceLibraryContracts.
contracts
)

Set the resource library contracts calculated as valid to use with this view.

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

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

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

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

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

Set the root component that is associated with this request.

public void
validationFailed()

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributesForInvalidFactoryConstructionback to summary
private Map<Object, Object> attributesForInvalidFactoryConstruction
currentPhaseIdForInvalidFactoryConstructionback to summary
private PhaseId currentPhaseIdForInvalidFactoryConstruction
defaultFacesContextback to summary
private FacesContext defaultFacesContext
initContextServletContextback to summary
private static ConcurrentHashMap<K, V> initContextServletContext
instanceback to summary
private static ThreadLocal<FacesContext> instance

The ThreadLocal variable used to record the FacesContext instance for each processing thread.

isCreatedFromValidFactoryback to summary
private boolean isCreatedFromValidFactory
partialViewContextForInvalidFactoryConstructionback to summary
private PartialViewContext partialViewContextForInvalidFactoryConstruction
processingEventsback to summary
private boolean processingEvents
threadInitContextback to summary
private static ConcurrentHashMap<K, V> threadInitContext

Constructor Detail

FacesContextback to summary
public FacesContext()

Default constructor.

This looks at the callstack to see if we're created from a factory.

Method Detail

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

Append a jakarta.faces.application.FacesMessage to the set of messages associated with the specified client identifier, if clientId is not null. If clientId is null, this jakarta.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

Exceptions
IllegalStateException:
if this method is called after this instance has been released
NullPointerException:
if message is null
getApplicationback to summary
public abstract Application getApplication()

Return the Application instance associated with this web application.

It is valid to call this method during application startup or shutdown. If called during application startup or shutdown, returns the correct current jakarta.faces.application.Application instance.

Returns:Application

the Application instance associated with this web application.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getAttributesback to summary
public Map<Object, Object> getAttributes()

Return a mutable Map representing the attributes associated wth this FacesContext instance. This Map is useful to store attributes that you want to go out of scope when the Faces lifecycle for the current request ends, which is not always the same as the request ending, especially in the case of Jakarta Servlet filters that are invoked after the Faces lifecycle for this request completes. Accessing this Map does not cause any events to fire, as is the case with the other maps: for request, session, and application scope. When release() is invoked, the attributes must be cleared.

The Map returned by this method is not associated with the request. If you would like to get or set request attributes, see ExternalContext#getRequestMap.

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

Returns:Map<Object, Object>

mutable Map representing the attributes associated wth this FacesContext instance.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.0
getClientIdsWithMessagesback to summary
public abstract Iterator<String> getClientIdsWithMessages()

Return an Iterator over the client identifiers for which at least one jakarta.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 jakarta.faces.application.FacesMessage has been queued.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getCurrentInstanceback to summary
public static FacesContext getCurrentInstance()

Return the FacesContext instance for the request that is being processed by the current thread. If called during application initialization or shutdown, any method documented as "valid to call this method during application startup or shutdown" must be supported during application startup or shutdown time. The result of calling a method during application startup or shutdown time that does not have this designation is undefined.

Returns:FacesContext

the instance of FacesContext.

getCurrentPhaseIdback to summary
public PhaseId getCurrentPhaseId()

Return the value last set on this FacesContext instance when setCurrentPhaseId was called.

Returns:PhaseId

the current phase id.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.0
getELContextback to summary
public ELContext getELContext()

Return the ELContext instance for this FacesContext instance. This ELContext instance has the same lifetime and scope as the FacesContext instance with which it is associated, and may be created lazily the first time this method is called for a given FacesContext instance. Upon creation of the ELContext instance, the implementation must take the following action:

Returns:ELContext

instance of ELContext.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
1.2
getExceptionHandlerback to summary
public ExceptionHandler getExceptionHandler()

Return the ExceptionHandler for this request.

Returns:ExceptionHandler

instance of ExceptionHandler.

getExternalContextback to summary
public abstract ExternalContext getExternalContext()

Return the ExternalContext instance for this FacesContext instance.

It is valid to call this method during application startup or shutdown. If called during application startup or shutdown, this method returns an ExternalContext instance with the special behaviors indicated in the javadoc for that class. Methods document as being valid to call during application startup or shutdown must be supported.

Returns:ExternalContext

instance of ExternalContext

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getLifecycleback to summary
public abstract Lifecycle getLifecycle()

Return the Lifecycle instance for this FacesContext instance.

Returns:Lifecycle

instance of Lifecycle

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
4.0
getMaximumSeverityback to summary
public abstract FacesMessage.Severity getMaximumSeverity()

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

Returns:FacesMessage.Severity

the maximum severity level.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getMessageListback to summary
public List<FacesMessage> getMessageList()

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

Returns:List<FacesMessage>

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

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.0
getMessageListback to summary
public List<FacesMessage> getMessageList(String clientId)

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.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.0
getMessagesback to summary
public abstract Iterator<FacesMessage> getMessages()

Return an Iterator over the jakarta.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.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getMessagesback to summary
public abstract Iterator<FacesMessage> getMessages(String clientId)

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

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getNamingContainerSeparatorCharback to summary
public char getNamingContainerSeparatorChar()

Return the result of calling UINamingContainer#getSeparatorChar, passing this as the argument. Note that this enables accessing the value of this property from the Jakarta Expression Language expression #{facesContext.namingContainerSeparatorChar}.

Returns:char

the separator char.

getPartialViewContextback to summary
public PartialViewContext getPartialViewContext()

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.

Returns:PartialViewContext

the instance of PartialViewContext for this request.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.0
getRenderKitback to summary
public abstract RenderKit 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.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getRenderResponseback to summary
public abstract boolean getRenderResponse()

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

Returns:boolean

flag indicating whether the renderResponse() has been called.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getResourceLibraryContractsback to summary
public List<String> getResourceLibraryContracts()

Return the list of resource library contracts that have been calculated to be appropriate for use with this view, or an empty list if there are no such resource library contracts. The list returned by this method must be immutable. For backward compatibility with implementations of the specification prior to when this method was introduced, an implementation is provided that returns an empty list. Implementations compliant with the version in which this method was introduced must implement this method as specified.

Returns:List<String>

the list of resource library contracts.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.2
getResponseCompleteback to summary
public abstract boolean 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.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getResponseStreamback to summary
public abstract ResponseStream 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.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getResponseWriterback to summary
public abstract ResponseWriter 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.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
getViewRootback to summary
public abstract UIViewRoot getViewRoot()

Return the root component that is associated with the this request.

It is valid to call this method during application startup or shutdown. If called during application startup or shutdown, this method returns a new UIViewRoot with its locale set to Locale.getDefault().

Returns:UIViewRoot

UIViewRoot instance.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
isPostbackback to summary
public boolean isPostback()

This utility method simply returns the result of jakarta.faces.render.ResponseStateManager#isPostback(FacesContext).

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

Returns:boolean

the boolean indicating whether this request is a post one.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.0
isProcessingEventsback to summary
public boolean isProcessingEvents()

Returns a flag indicating whether or not the runtime should publish events when asked to do so.

Returns:boolean

true if events should be published, otherwise false

isProjectStageback to summary
public boolean isProjectStage(ProjectStage stage)

Return true if the current ProjectStage as returned by the Application instance is equal to stage, otherwise return false

Parameters
stage:ProjectStage

the ProjectStage to check

Returns:boolean

boolean indicating whether the application has the same stage.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
NullPointerException:
if stage is null
isReleasedback to summary
public boolean isReleased()

Return a flag indicating if the resources associated with this FacesContext instance have been released.

Returns:boolean

true if the resources have been released.

Since
2.1
isValidationFailedback to summary
public boolean 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

Exceptions
IllegalStateException:
if this method is called after this instance has been released
releaseback to summary
public abstract void release()

Release any resources associated with this FacesContext instance. Faces implementations may choose to pool instances in the associated FacesContextFactory to avoid repeated object creation and garbage collection. After release() is called on a FacesContext instance (until the FacesContext instance has been recycled by the implementation for re-use), calling any other methods will cause an IllegalStateException to be thrown.

If a call was made to getAttributes during the processing for this request, the implementation must call clear() on the Map returned from getAttributes(), and then de-allocate the data-structure behind that Map.

The implementation must call setCurrentInstance passing null to remove the association between this thread and this dead FacesContext instance.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
renderResponseback to summary
public abstract void renderResponse()

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

Exceptions
IllegalStateException:
if this method is called after this instance has been released
responseCompleteback to summary
public abstract void responseComplete()

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

Exceptions
IllegalStateException:
if this method is called after this instance has been released
setCurrentInstanceback to summary
protected static void setCurrentInstance(FacesContext context)

Set the FacesContext instance for the request that is being processed by the current thread.

Parameters
context:FacesContext

The FacesContext instance for the current thread, or null if this thread no longer has a FacesContext instance.

setCurrentPhaseIdback to summary
public void setCurrentPhaseId(PhaseId currentPhaseId)

The implementation must call this method at the earliest possble point in time after entering into a new phase in the request processing lifecycle.

Parameters
currentPhaseId:PhaseId

The jakarta.faces.event.PhaseId for the current phase.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.0
setExceptionHandlerback to summary
public void setExceptionHandler(ExceptionHandler exceptionHandler)

Set the ExceptionHandler for this request.

Parameters
exceptionHandler:ExceptionHandler

the ExceptionHandler for this request.

setProcessingEventsback to summary
public void setProcessingEvents(boolean processingEvents)

Allows control of wheter or not the runtime will publish events when Application#publishEvent(FacesContext, Class, Object) or Application#publishEvent(FacesContext, Class, Class, Object) is called.

Parameters
processingEvents:boolean

flag indicating events should be processed or not

setResourceLibraryContractsback to summary
public void setResourceLibraryContracts(List<String> contracts)

Set the resource library contracts calculated as valid to use with this view. The implementation must copy the contents of the incoming List into an immutable List for return from getResourceLibraryContracts. If the argument is null or empty, the action taken is the same as if the argument is null: a subsequent call to getResourceLibraryContracts returns null. This method may only be called during the processing of jakarta.faces.view.ViewDeclarationLanguage#createView and during the VDL tag handler for the tag corresponding to an instance of UIViewRoot. For backward compatibility with implementations of the specification prior to when this method was introduced, an implementation is provided that takes no action. Implementations compliant with the version in which this method was introduced must implement this method as specified.

Parameters
contracts:List<String>

The new contracts to be returned, as an immutable List. from a subsequent call to getResourceLibraryContracts.

Exceptions
IllegalStateException:
if this method is called after this instance has been released
Since
2.2
setResponseStreamback to summary
public abstract void setResponseStream(ResponseStream responseStream)

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

Parameters
responseStream:ResponseStream

The new ResponseStream for this response

Exceptions
NullPointerException:
if responseStream is null
IllegalStateException:
if this method is called after this instance has been released
setResponseWriterback to summary
public abstract void setResponseWriter(ResponseWriter responseWriter)

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

Parameters
responseWriter:ResponseWriter

The new ResponseWriter for this response

Exceptions
IllegalStateException:
if this method is called after this instance has been released
NullPointerException:
if responseWriter is null
setViewRootback to summary
public abstract void setViewRoot(UIViewRoot root)

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

Exceptions
IllegalStateException:
if this method is called after this instance has been released
NullPointerException:
if root is null
validationFailedback to summary
public void 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.

Exceptions
IllegalStateException:
if this method is called after this instance has been released