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

public Class FileRenderer

extends TextRenderer
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, .Collection, .Collections, .Map, java.util.stream.Collectors, com.sun.faces.renderkit.RenderKitUtils, jakarta.faces.FacesException, jakarta.faces.application.FacesMessage, .ProjectStage, jakarta.faces.component.UIComponent, .UIForm, jakarta.faces.component.html.HtmlInputFile, jakarta.faces.context.ExternalContext, .FacesContext, jakarta.faces.convert.ConverterException, jakarta.servlet.ServletException, jakarta.servlet.http.HttpServletRequest, .Part

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

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

Decode any new state of the specified UIComponent from the request contained in the specified FacesContext, and store that state on the UIComponent.

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

Overrides com.sun.faces.renderkit.html_basic.TextRenderer.encodeBegin.

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

public Object
getConvertedValue(FacesContext
FacesContext for the request we are processing
context
,
UIComponent
UIComponent to be decoded.
component
,
Object
a value stored on the component during decode.
submittedValue
)

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue.

Attempt to convert previously stored state information into an object of the type required for this component (optionally using the registered jakarta.faces.convert.Converter for this component, if there is one).

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.TextRenderer.getEndTextToRender.

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

private static boolean
isEmpty(Part part)

Inherited from com.sun.faces.renderkit.html_basic.TextRenderer:
encodeChildrengetRendersChildren

Constructor Detail

FileRendererback to summary
public FileRenderer()

Method Detail

decodeback to summary
public void decode(FacesContext context, UIComponent component)

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

Doc from jakarta.faces.render.Renderer.decode.

Decode any new state of the specified UIComponent from the request contained in the specified FacesContext, and store that state on the UIComponent.

During decoding, events may be enqueued for later processing (by event listeners that have registered an interest), by calling queueEvent() on the associated UIComponent.

Parameters
context:FacesContext

FacesContext for the request we are processing

component:UIComponent

UIComponent to be decoded.

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

Overrides com.sun.faces.renderkit.html_basic.TextRenderer.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
getConvertedValueback to summary
public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException

Overrides com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue.

Doc from jakarta.faces.render.Renderer.getConvertedValue.

Attempt to convert previously stored state information into an object of the type required for this component (optionally using the registered jakarta.faces.convert.Converter for this component, if there is one). If conversion is successful, the new value should be returned from this method; if not, a ConverterException should be thrown.

Parameters
context:FacesContext

FacesContext for the request we are processing

component:UIComponent

UIComponent to be decoded.

submittedValue:Object

a value stored on the component during decode.

Returns:Object

the converted value

Annotations
@Override
Exceptions
ConverterException:
if the submitted value cannot be converted successfully.
getEndTextToRenderback to summary
protected void getEndTextToRender(FacesContext context, UIComponent component, String currentValue) throws IOException

Overrides com.sun.faces.renderkit.html_basic.TextRenderer.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
isEmptyback to summary
private static boolean isEmpty(Part part)