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

public abstract Class ScriptStyleBaseRenderer

extends Renderer
implements ComponentSystemEventListener
Class Inheritance
All Implemented Interfaces
jakarta.faces.event.ComponentSystemEventListener, jakarta.faces.event.FacesListener, java.util.EventListener
Known Direct Subclasses
com.sun.faces.renderkit.html_basic.StylesheetRenderer, com.sun.faces.renderkit.html_basic.ScriptRenderer
Annotations
@ListenerFor
systemEventClass:PostAddToViewEvent
Imports
java.io.IOException, java.util.Iterator, .Map, java.util.logging.Logger, com.sun.faces.application.ApplicationAssociate, com.sun.faces.util.FacesLogger, jakarta.faces.application.FacesMessage, .ProjectStage, .Resource, .ResourceHandler, jakarta.faces.component.UIComponent, .UINamingContainer, jakarta.faces.context.FacesContext, .ResponseWriter, jakarta.faces.event.AbortProcessingException, .ComponentSystemEvent, .ComponentSystemEventListener, .ListenerFor, .PostAddToViewEvent, jakarta.faces.render.Renderer

Base class for shared behavior between Script and Stylesheet renderers. Maybe composition would be better, but inheritance is easier

Field Summary

Modifier and TypeField and Description
private static final String
protected static final Logger
Inherited from jakarta.faces.render.Renderer:
PASSTHROUGH_RENDERER_LOCALNAME_KEY

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Overrides 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.

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 final 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.

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

Overrides jakarta.faces.render.Renderer.encodeEnd.

Render the ending of the current state of the specified UIComponent, following the rules described for encodeBegin() to acquire the appropriate value to be rendered.

protected abstract void
endExternalElement(ResponseWriter writer, UIComponent component, String resourceUrl)

Allow the subclass to customize the end external element content.

protected abstract void
endInlineElement(ResponseWriter writer, UIComponent component)

Allow the subclass to customize the end inline element content.

private static UIComponent
public final boolean
getRendersChildren()

Overrides 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.

public void
processEvent(ComponentSystemEvent
the ComponentSystemEvent instance that is being processed.
event
)

Implements jakarta.faces.event.ComponentSystemEventListener.processEvent.

When called, the listener can assume that any guarantees given in the javadoc for the specific SystemEvent subclass are true.

protected abstract void
startExternalElement(FacesContext context, ResponseWriter writer, UIComponent component)

Allow the subclass to customize the start external element content.

protected abstract void
startInlineElement(FacesContext context, ResponseWriter writer, UIComponent component)

Allow the subclass to customize the start inline element content.

protected String
verifyTarget(String toVerify)

Allow a subclass to control what's a valid value for "target".

Inherited from jakarta.faces.render.Renderer:
convertClientIdgetConvertedValue

Field Detail

COMP_KEYback to summary
private static final String COMP_KEY
loggerback to summary
protected static final Logger logger

Constructor Detail

ScriptStyleBaseRendererback to summary
public ScriptStyleBaseRenderer()

Method Detail

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

Overrides jakarta.faces.render.Renderer.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 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 final 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
encodeEndback to summary
public void encodeEnd(FacesContext context, UIComponent component) throws IOException

Overrides jakarta.faces.render.Renderer.encodeEnd.

Doc from jakarta.faces.render.Renderer.encodeEnd.

Render the ending of the current state of the specified UIComponent, following the rules described for encodeBegin() to acquire the appropriate value to be rendered.

Parameters
context:FacesContext

FacesContext for the response we are creating

component:UIComponent

UIComponent to be rendered

Annotations
@Override
Exceptions
IOException:
if an input/output error occurs while rendering
endExternalElementback to summary
protected abstract void endExternalElement(ResponseWriter writer, UIComponent component, String resourceUrl) throws IOException

Allow the subclass to customize the end external element content.

endInlineElementback to summary
protected abstract void endInlineElement(ResponseWriter writer, UIComponent component) throws IOException

Allow the subclass to customize the end inline element content.

findComponentIgnoringNamingContainersback to summary
private static UIComponent findComponentIgnoringNamingContainers(UIComponent base, String id, boolean checkId)
getRendersChildrenback to summary
public final boolean getRendersChildren()

Overrides jakarta.faces.render.Renderer.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
processEventback to summary
public void processEvent(ComponentSystemEvent event) throws AbortProcessingException

Implements jakarta.faces.event.ComponentSystemEventListener.processEvent.

Doc from jakarta.faces.event.ComponentSystemEventListener.processEvent.

When called, the listener can assume that any guarantees given in the javadoc for the specific SystemEvent subclass are true.

Parameters
event:ComponentSystemEvent

the ComponentSystemEvent instance that is being processed.

Annotations
@Override
Exceptions
AbortProcessingException:
if lifecycle processing should cease for this request.
startExternalElementback to summary
protected abstract void startExternalElement(FacesContext context, ResponseWriter writer, UIComponent component) throws IOException

Allow the subclass to customize the start external element content.

startInlineElementback to summary
protected abstract void startInlineElement(FacesContext context, ResponseWriter writer, UIComponent component) throws IOException

Allow the subclass to customize the start inline element content.

verifyTargetback to summary
protected String verifyTarget(String toVerify)

Allow a subclass to control what's a valid value for "target".