A Renderer converts the internal representation of
UIComponents into the output stream (or writer) associated with the response we are creating for a particular
request. Each Renderer knows how to render one or more UIComponent types (or classes), and
advertises a set of render-dependent attributes that it recognizes for each supported UIComponent.
Families of Renderers are packaged as a RenderKit, and together support the rendering of all of the
UIComponents in a view associated with a FacesContext. Within the set of Renderers for a
particular RenderKit, each must be uniquely identified by the rendererType property.
Individual Renderer instances will be instantiated as requested during the rendering process, and will remain
in existence for the remainder of the lifetime of a web application. Because each instance may be invoked from more
than one request processing thread simultaneously, they MUST be programmed in a thread-safe manner.
If the jakarta. annotation is attached to the class definition of a
Renderer, that class must also implement jakarta., and
the action pertaining to the processing of ResourceDependency on a Renderer described in
jakarta. must be taken.
If the jakarta. annotation is attached to the class definition of a
Renderer, the action pertaining to the processing of ResourceDependency on a
Renderer described in UIComponent#getChildren must be taken.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | PASSTHROUGH_RENDERER_LOCALNAME_KEY
The key in the component passthrough attributes |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: the convertedclientIdFacesContext for the current requestthe client identifier to be converted to client a specific format. clientId)Convert the component generated client id to a form suitable for transmission to the client. |
| public void | decode(FacesContext
FacesContext for the request we are processingUIComponent to be decoded.
Decode any new state of the specified |
| public void | encodeBegin(FacesContext
FacesContext for the request we are processingUIComponent to be rendered
Render the beginning specified |
| public void | encodeChildren(FacesContext
FacesContext for the response we are creatingUIComponent whose children are to be rendered
Render the child components of this |
| public void | encodeEnd(FacesContext
FacesContext for the response we are creatingUIComponent to be rendered
Render the ending of the current state of the specified |
| public Object | Returns: the converted valueFacesContext for the request we are processingUIComponent to be decoded.a value stored on the component during submittedValue)decode.
Attempt to convert previously stored state information into an object of the type required for this component
(optionally using the registered |
| public boolean | Returns: the current value of the flag
Return a flag indicating whether this |
| PASSTHROUGH_RENDERER_LOCALNAME_KEY | back to summary |
|---|---|
| public static final String PASSTHROUGH_RENDERER_LOCALNAME_KEY
The key in the component passthrough attributes
| |
| Renderer | back to summary |
|---|---|
| public Renderer() | |
| convertClientId | back to summary |
|---|---|
| public String convertClientId(FacesContext context, String clientId) Convert the component generated client id to a form suitable for transmission to the client.
The default implementation returns the argument
| |
| decode | back to summary |
|---|---|
| public void decode(FacesContext context, T component)
Decode any new state of the specified
During decoding, events may be enqueued for later processing (by event listeners that have registered an interest),
by calling
| |
| encodeBegin | back to summary |
|---|---|
| public void encodeBegin(FacesContext context, T component) throws IOException
Render the beginning specified
| |
| encodeChildren | back to summary |
|---|---|
| public void encodeChildren(FacesContext context, T component) throws IOException
Render the child components of this
| |
| encodeEnd | back to summary |
|---|---|
| public void encodeEnd(FacesContext context, T component) throws IOException
Render the ending of the current state of the specified
| |
| getConvertedValue | back to summary |
|---|---|
| public Object getConvertedValue(FacesContext context, T component, Object submittedValue) throws ConverterException
Attempt to convert previously stored state information into an object of the type required for this component
(optionally using the registered
| |
| getRendersChildren | back to summary |
|---|---|
| public boolean getRendersChildren()
Return a flag indicating whether this
| |