Top Inners Fields Constructors Methods
com.sun.faces.context

public Class FacesContextImpl

extends FacesContext
Class Inheritance
Static Imports
java.util.stream.Collectors.toSet

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private Application
private Map<Object, Object>
private Map<String, List<FacesMessage>>
componentMessageLists

Store mapping of clientId to ArrayList of FacesMessage instances.

private PhaseId
private static final ThreadLocal<FacesContext>
private ELContext
private ExceptionHandler
private ExternalContext
private RenderKit
private String
private Lifecycle
private static final Logger
private FacesMessage.Severity
private PartialViewContext
private static final String
private boolean
private boolean
private List<String>
private boolean
private ResponseStream
private ResponseWriter
private RenderKitFactory
private boolean
private UIViewRoot

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 jakarta.faces.context.FacesContext.addMessage.

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

private void
public Application
getApplication()

Implements abstract jakarta.faces.context.FacesContext.getApplication.

Return the Application instance associated with this web application.

public Map<Object, Object>
getAttributes()

Overrides jakarta.faces.context.FacesContext.getAttributes.

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

public Iterator<String>
getClientIdsWithMessages()

Implements abstract jakarta.faces.context.FacesContext.getClientIdsWithMessages.

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

public PhaseId
getCurrentPhaseId()

Overrides jakarta.faces.context.FacesContext.getCurrentPhaseId.

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

public static FacesContext
public ELContext
getELContext()

Overrides jakarta.faces.context.FacesContext.getELContext.

Return the ELContext instance for this FacesContext instance.

public ExceptionHandler
public ExternalContext
getExternalContext()

Implements abstract jakarta.faces.context.FacesContext.getExternalContext.

Return the ExternalContext instance for this FacesContext instance.

public Lifecycle
getLifecycle()

Implements abstract jakarta.faces.context.FacesContext.getLifecycle.

Return the Lifecycle instance for this FacesContext instance.

public FacesMessage.Severity
getMaximumSeverity()

Implements abstract jakarta.faces.context.FacesContext.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>
getMessageList()

Overrides jakarta.faces.context.FacesContext.getMessageList.

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

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

Overrides jakarta.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 jakarta.faces.context.FacesContext.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 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 jakarta.faces.context.FacesContext.getMessages.

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 PartialViewContext
public RenderKit
getRenderKit()

Implements abstract jakarta.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 jakarta.faces.context.FacesContext.getRenderResponse.

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

public List<String>
getResourceLibraryContracts()

Overrides jakarta.faces.context.FacesContext.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 boolean
getResponseComplete()

Implements abstract jakarta.faces.context.FacesContext.getResponseComplete.

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

public ResponseStream
getResponseStream()

Implements abstract jakarta.faces.context.FacesContext.getResponseStream.

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

public ResponseWriter
getResponseWriter()

Implements abstract jakarta.faces.context.FacesContext.getResponseWriter.

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

public UIViewRoot
getViewRoot()

Implements abstract jakarta.faces.context.FacesContext.getViewRoot.

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

public boolean
public boolean
isReleased()

Overrides jakarta.faces.context.FacesContext.isReleased.

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

public boolean
isValidationFailed()

Overrides jakarta.faces.context.FacesContext.isValidationFailed.

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

public void
release()

Implements abstract jakarta.faces.context.FacesContext.release.

Release any resources associated with this FacesContext instance.

public void
renderResponse()

Implements abstract jakarta.faces.context.FacesContext.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 void
responseComplete()

Implements abstract jakarta.faces.context.FacesContext.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.

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

Overrides jakarta.faces.context.FacesContext.setCurrentPhaseId.

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
)

Overrides jakarta.faces.context.FacesContext.setExceptionHandler.

Set the ExceptionHandler for this request.

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

Overrides jakarta.faces.context.FacesContext.setResourceLibraryContracts.

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

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

Implements abstract jakarta.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 jakarta.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 jakarta.faces.context.FacesContext.setViewRoot.

Set the root component that is associated with this request.

public void
validationFailed()

Overrides jakarta.faces.context.FacesContext.validationFailed.

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

Inherited from jakarta.faces.context.FacesContext:
getCurrentInstancegetNamingContainerSeparatorCharisProcessingEventsisProjectStagesetCurrentInstancesetProcessingEvents