Top Description Fields Constructors Methods
com.sun.faces.renderkit.html_basic

public Class TextRenderer

extends HtmlBasicInputRenderer
Class Inheritance
Known Direct Subclasses
com.sun.faces.renderkit.html_basic.FileRenderer
Imports
java.io.IOException, java.util.Collections, .HashMap, .Map, com.sun.faces.config.WebConfiguration, com.sun.faces.renderkit.Attribute, .AttributeManager, .RenderKitUtils, jakarta.faces.application.FacesMessage, .ProjectStage, jakarta.faces.component.UIComponent, .UIInput, .UIOutput, jakarta.faces.component.html.HtmlInputFile, .HtmlInputText, jakarta.faces.context.FacesContext, .ResponseWriter

TextRenderer is a class that renders the current value of UIInput or UIOutput component as a input field or static text.

Field Summary

Modifier and TypeField and Description
private static final Attribute[]
private static final Attribute[]
private static final Attribute[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
encodeBegin(FacesContext
FacesContext for the request we are processing
context
,
UIComponent
UIComponent to be rendered
component
)

Overrides jakarta.faces.render.Renderer.encodeBegin.

Render the beginning specified UIComponent to the output stream or writer associated with the response we are creating.

public void
encodeChildren(FacesContext
FacesContext for the response we are creating
context
,
UIComponent
UIComponent whose children are to be rendered
component
)

Overrides jakarta.faces.render.Renderer.encodeChildren.

Render the child components of this UIComponent, following the rules described for encodeBegin() to acquire the appropriate value to be rendered.

protected void
getEndTextToRender(FacesContext
the FacesContext for the current request
context
,
UIComponent
the UIComponent of interest
component
,
String
component's current value
currentValue
)

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getEndTextToRender.

Renderers override this method to write appropriate HTML content into the buffer.

public boolean
getRendersChildren()

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getRendersChildren.

Return a flag indicating whether this Renderer is responsible for rendering the children the component it is asked to render.

private static Map<String, String>
Inherited from com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer:
getConvertedValuegetNonOnChangeBehaviorsgetNonOnClickSelectBehaviorsgetValuesetSubmittedValue

Field Detail

INPUTFILE_ATTRIBUTESback to summary
private static final Attribute[] INPUTFILE_ATTRIBUTES
INPUTTEXT_ATTRIBUTESback to summary
private static final Attribute[] INPUTTEXT_ATTRIBUTES
OUTPUT_ATTRIBUTESback to summary
private static final Attribute[] OUTPUT_ATTRIBUTES

Constructor Detail

TextRendererback to summary
public TextRenderer()

Method Detail

encodeBeginback to summary
public void encodeBegin(FacesContext context, UIComponent component) throws IOException

Overrides jakarta.faces.render.Renderer.encodeBegin.

Doc from jakarta.faces.render.Renderer.encodeBegin.

Render the beginning specified UIComponent to the output stream or writer associated with the response we are creating. If the conversion attempted in a previous call to getConvertedValue() for this component failed, the state information saved during execution of decode() should be used to reproduce the incorrect input.

Parameters
context:FacesContext

FacesContext for the request we are processing

component:UIComponent

UIComponent to be rendered

Annotations
@Override
Exceptions
IOException:
if an input/output error occurs while rendering
encodeChildrenback to summary
public void encodeChildren(FacesContext context, UIComponent component) throws IOException

Overrides jakarta.faces.render.Renderer.encodeChildren.

Doc from jakarta.faces.render.Renderer.encodeChildren.

Render the child components of this UIComponent, following the rules described for encodeBegin() to acquire the appropriate value to be rendered. This method will only be called if the rendersChildren property of this component is true.

Parameters
context:FacesContext

FacesContext for the response we are creating

component:UIComponent

UIComponent whose children are to be rendered

Annotations
@Override
Exceptions
IOException:
if an input/output error occurs while rendering
getEndTextToRenderback to summary
protected void getEndTextToRender(FacesContext context, UIComponent component, String currentValue) throws IOException

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getEndTextToRender.

Doc from com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getEndTextToRender.

Renderers override this method to write appropriate HTML content into the buffer.

Parameters
context:FacesContext

the FacesContext for the current request

component:UIComponent

the UIComponent of interest

currentValue:String

component's current value

Annotations
@Override
Exceptions
IOException:
if an error occurs rendering the text
getRendersChildrenback to summary
public boolean getRendersChildren()

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getRendersChildren.

Doc from jakarta.faces.render.Renderer.getRendersChildren.

Return a flag indicating whether this Renderer is responsible for rendering the children the component it is asked to render. The default implementation returns false.

Returns:boolean

the current value of the flag

Annotations
@Override
mapRecommendedComponentsByDiscommendedTypesback to summary
private static Map<String, String> mapRecommendedComponentsByDiscommendedTypes()