- Direct Known Subclasses:
InlineScriptRenderer,InlineStylesheetRenderer
Base renderer which is to be shared between inline CSS and JS renderers.
- Since:
- 1.2
- Author:
- Bauke Scholtz
- See Also:
-
Field Summary
Fields inherited from class jakarta.faces.render.Renderer
PASSTHROUGH_RENDERER_LOCALNAME_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencodeChildren(FacesContext context, UIOutput component) Obtain the resource, construct aReaderaround it using the character encoding as obtained from the response writer and then invokestartElement(FacesContext, ResponseWriter, UIOutput)writeResource(Reader, ResponseWriter)andendElement(ResponseWriter)in sequence.abstract voidendElement(ResponseWriter writer) End the element.booleanReturnstrue.abstract voidstartElement(FacesContext context, ResponseWriter writer, UIOutput component) Start the element.abstract voidwriteResource(Reader reader, ResponseWriter writer) Write the resource inline.Methods inherited from class jakarta.faces.render.Renderer
convertClientId, decode, encodeBegin, encodeEnd, getConvertedValue
-
Constructor Details
-
InlineResourceRenderer
public InlineResourceRenderer()
-
-
Method Details
-
getRendersChildren
public boolean getRendersChildren()Returnstrue.- Overrides:
getRendersChildrenin classRenderer<UIOutput>
-
encodeChildren
Obtain the resource, construct aReaderaround it using the character encoding as obtained from the response writer and then invokestartElement(FacesContext, ResponseWriter, UIOutput)writeResource(Reader, ResponseWriter)andendElement(ResponseWriter)in sequence.- Overrides:
encodeChildrenin classRenderer<UIOutput>- Throws:
IOException
-
startElement
public abstract void startElement(FacesContext context, ResponseWriter writer, UIOutput component) throws IOException Start the element.- Parameters:
writer- The response writer.component- TheUIComponentto which this element corresponds.- Throws:
IOException- When an I/O error occurs.
-
writeResource
Write the resource inline.- Parameters:
reader- The reader providing the resource content.writer- The response writer where the resource content has to be written to.- Throws:
IOException- When an I/O error occurs.
-
endElement
End the element.- Parameters:
writer- The response writer.- Throws:
IOException- When an I/O error occurs.
-