Class ViewHandler

java.lang.Object
jakarta.faces.application.ViewHandler
Direct Known Subclasses:
MultiViewHandler, ViewHandlerWrapper

public abstract class ViewHandler extends Object

ViewHandler is the pluggablity mechanism for allowing implementations of or applications using the Jakarta Faces Specification to provide their own handling of the activities in the Render Response and Restore View phases of the request processing lifecycle. This allows for implementations to support different response generation technologies, as well as alternative strategies for saving and restoring the state of each view. An implementation of this class must be thread-safe.

Please see StateManager for information on how the ViewHandler interacts the StateManager.

Version 2 of the specification formally introduced the concept of View Declaration Language. A View Declaration Language (VDL) is a syntax used to declare user interfaces comprised of instances of Jakarta Faces UIComponents. Any of the responsibilities of the ViewHandler that specifically deal with the VDL sub-system are now the domain of the VDL implementation. These responsibilities are defined on the ViewDeclarationLanguage class. The ViewHandler provides getViewDeclarationLanguage(jakarta.faces.context.FacesContext, java.lang.String) as a convenience method to access the VDL implementation given a viewId.