public abstract class HtmlBasicRenderer
extends jakarta.faces.render.Renderer
| Modifier and Type | Class and Description |
|---|---|
static class |
HtmlBasicRenderer.OptionComponentInfo
Structure to hold common info used by Select* components to reduce the number of times component attributes are
evaluated when rendering options.
|
static class |
HtmlBasicRenderer.Param
Simple class to encapsulate the name and value of a
UIParameter. |
| Modifier and Type | Field and Description |
|---|---|
protected static HtmlBasicRenderer.Param[] |
EMPTY_PARAMS |
protected static Logger |
logger |
| Constructor and Description |
|---|
HtmlBasicRenderer() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
augmentIdReference(String forValue,
jakarta.faces.component.UIComponent fromComponent)
Conditionally augment an id-reference value.
|
String |
convertClientId(jakarta.faces.context.FacesContext context,
String clientId)
Convert the component generated client id to a form suitable for transmission to the client.
|
void |
decode(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component)
Decode any new state of the specified
UIComponent from the request contained in the specified
FacesContext, and store that state on the UIComponent. |
protected String |
decodeBehaviors(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component) |
void |
encodeEnd(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component)
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 void |
encodeRecursive(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component)
Render nested child components by invoking the encode methods on those components, but only when the
rendered property is true. |
protected Collection<jakarta.faces.component.behavior.ClientBehaviorContext.Parameter> |
getBehaviorParameters(jakarta.faces.component.UIComponent command)
Collections parameters for use with Behavior script rendering.
|
protected Iterator<jakarta.faces.component.UIComponent> |
getChildren(jakarta.faces.component.UIComponent component) |
protected String |
getCurrentValue(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component) |
protected void |
getEndTextToRender(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component,
String currentValue)
Renderers override this method to write appropriate HTML content into the buffer.
|
protected jakarta.faces.component.UIComponent |
getFacet(jakarta.faces.component.UIComponent component,
String name) |
protected jakarta.faces.component.UIComponent |
getForComponent(jakarta.faces.context.FacesContext context,
String forComponent,
jakarta.faces.component.UIComponent component)
Locates the component identified by
forComponent |
protected String |
getFormattedValue(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component,
Object currentValue) |
protected String |
getFormattedValue(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component,
Object currentValue,
jakarta.faces.convert.Converter converter)
Overloads getFormattedValue to take a advantage of a previously obtained converter.
|
protected Iterator |
getMessageIter(jakarta.faces.context.FacesContext context,
String forComponent,
jakarta.faces.component.UIComponent component) |
protected HtmlBasicRenderer.Param[] |
getParamList(jakarta.faces.component.UIComponent command) |
protected static Map<String,List<jakarta.faces.component.behavior.ClientBehavior>> |
getPassThruBehaviors(jakarta.faces.component.UIComponent component,
String domEventName,
String componentEventName)
When rendering pass thru attributes, we need to take any attached Behaviors into account.
|
boolean |
getRendersChildren()
Return a flag indicating whether this
Renderer is responsible for rendering the children the component it is
asked to render. |
protected Object |
getValue(jakarta.faces.component.UIComponent component) |
protected boolean |
isBehaviorSource(jakarta.faces.context.FacesContext ctx,
String behaviorSourceId,
String componentClientId) |
protected void |
rendererParamsNotNull(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component) |
protected void |
setSubmittedValue(jakarta.faces.component.UIComponent component,
Object value)
Renderers override this method to store the previous value of the associated component.
|
protected boolean |
shouldDecode(jakarta.faces.component.UIComponent component) |
protected boolean |
shouldEncode(jakarta.faces.component.UIComponent component) |
protected boolean |
shouldEncodeChildren(jakarta.faces.component.UIComponent component) |
protected boolean |
shouldWriteIdAttribute(jakarta.faces.component.UIComponent component) |
protected String |
writeIdAttributeIfNecessary(jakarta.faces.context.FacesContext context,
jakarta.faces.context.ResponseWriter writer,
jakarta.faces.component.UIComponent component) |
protected static final Logger logger
protected static final HtmlBasicRenderer.Param[] EMPTY_PARAMS
public String convertClientId(jakarta.faces.context.FacesContext context, String clientId)
jakarta.faces.render.RendererConvert the component generated client id to a form suitable for transmission to the client.
The default implementation returns the argument clientId unchanged.
convertClientId in class jakarta.faces.render.Renderercontext - FacesContext for the current requestclientId - the client identifier to be converted to client a specific format.clientIdpublic void decode(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component)
jakarta.faces.render.Renderer
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.
decode in class jakarta.faces.render.Renderercontext - FacesContext for the request we are processingcomponent - UIComponent to be decoded.public void encodeEnd(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component)
throws IOException
jakarta.faces.render.Renderer
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.
encodeEnd in class jakarta.faces.render.Renderercontext - FacesContext for the response we are creatingcomponent - UIComponent to be renderedIOException - if an input/output error occurs while renderingpublic boolean getRendersChildren()
jakarta.faces.render.Renderer
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.
getRendersChildren in class jakarta.faces.render.Rendererprotected final String decodeBehaviors(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component)
protected boolean isBehaviorSource(jakarta.faces.context.FacesContext ctx,
String behaviorSourceId,
String componentClientId)
ctx - the FacesContext for the current requestbehaviorSourceId - the ID of the behavior sourcecomponentClientId - the client ID of the component being decodedtrue if the behavior source is for the component being decoded, otherwise falseprotected String augmentIdReference(String forValue, jakarta.faces.component.UIComponent fromComponent)
Conditionally augment an id-reference value.
If the forValue doesn't already include a generated suffix, but the id of the fromComponent
does include a generated suffix, then append the suffix from the fromComponent to the
forValue. Otherwise just return the forValue as is.
forValue - - the basic id-reference value.fromComponent - - the component that holds the code>forValue.forValue.protected void encodeRecursive(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component)
throws IOException
Render nested child components by invoking the encode methods on those components, but only when the
rendered property is true.
context - FacesContext for the current requestcomponent - the component to recursively encodeIOException - if an error occurrs during the encode processprotected Iterator<jakarta.faces.component.UIComponent> getChildren(jakarta.faces.component.UIComponent component)
component - UIComponent for which to extract childrenrendered property of true.protected String getCurrentValue(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component)
context - the FacesContext for the current requestcomponent - the UIComponent whose value we're interested inprotected void getEndTextToRender(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component,
String currentValue)
throws IOException
context - the FacesContext for the current requestcomponent - the UIComponent of interestcurrentValue - component's current valueIOException - if an error occurs rendering the textprotected jakarta.faces.component.UIComponent getFacet(jakarta.faces.component.UIComponent component,
String name)
component - Component from which to return a facetname - Name of the desired facetrendered
property is set to true.protected jakarta.faces.component.UIComponent getForComponent(jakarta.faces.context.FacesContext context,
String forComponent,
jakarta.faces.component.UIComponent component)
forComponentcontext - the FacesContext for the current requestforComponent - - the component to search forcomponent - - the starting point in which to begin the searchidforComponent otheriwse null if no match is found.protected String getFormattedValue(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, Object currentValue, jakarta.faces.convert.Converter converter) throws jakarta.faces.convert.ConverterException
context - the FacesContext for the current requestcomponent - UIComponent of interestcurrentValue - the current value of componentconverter - the component's converterjakarta.faces.convert.ConverterException - if the value cannot be convertedprotected String getFormattedValue(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, Object currentValue) throws jakarta.faces.convert.ConverterException
context - the FacesContext for the current requestcomponent - UIComponent of interestcurrentValue - the current value of componentjakarta.faces.convert.ConverterException - if the value cannot be convertedprotected Iterator getMessageIter(jakarta.faces.context.FacesContext context, String forComponent, jakarta.faces.component.UIComponent component)
protected HtmlBasicRenderer.Param[] getParamList(jakarta.faces.component.UIComponent command)
command - the command which may have parametersprotected Collection<jakarta.faces.component.behavior.ClientBehaviorContext.Parameter> getBehaviorParameters(jakarta.faces.component.UIComponent command)
command - the command which may have parametersprotected Object getValue(jakarta.faces.component.UIComponent component)
protected void setSubmittedValue(jakarta.faces.component.UIComponent component,
Object value)
component - the target component to which the submitted value will be setvalue - the value to setprotected boolean shouldWriteIdAttribute(jakarta.faces.component.UIComponent component)
component - the component of interestprotected String writeIdAttributeIfNecessary(jakarta.faces.context.FacesContext context, jakarta.faces.context.ResponseWriter writer, jakarta.faces.component.UIComponent component)
protected void rendererParamsNotNull(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component)
protected boolean shouldEncode(jakarta.faces.component.UIComponent component)
protected boolean shouldDecode(jakarta.faces.component.UIComponent component)
protected boolean shouldEncodeChildren(jakarta.faces.component.UIComponent component)
protected static Map<String,List<jakarta.faces.component.behavior.ClientBehavior>> getPassThruBehaviors(jakarta.faces.component.UIComponent component, String domEventName, String componentEventName)
component - the component that we are renderingdomEventName - the name of the dom-level eventcomponentEventName - the name of the component-level eventCopyright © 2010–2022 JBoss by Red Hat. All rights reserved.