Class HtmlRenderer
- java.lang.Object
-
- jakarta.faces.render.Renderer
-
- org.apache.myfaces.renderkit.html.base.HtmlRenderer
-
- Direct Known Subclasses:
HtmlBodyRendererBase
,HtmlButtonRendererBase
,HtmlCheckboxRendererBase
,HtmlCommandScriptRenderer
,HtmlCompositeComponentRenderer
,HtmlCompositeFacetRenderer
,HtmlFormatRenderer
,HtmlFormRendererBase
,HtmlGridRendererBase
,HtmlGroupRendererBase
,HtmlHiddenRenderer
,HtmlImageRendererBase
,HtmlInputFileRendererBase
,HtmlLabelRenderer
,HtmlLinkRendererBase
,HtmlMessageRendererBase
,HtmlOutcomeTargetButtonRendererBase
,HtmlRadioRendererBase
,HtmlSecretRendererBase
,HtmlSelectableRendererBase
,HtmlTableRendererBase
,HtmlTextareaRendererBase
,HtmlTextRendererBase
,JsfElementRenderer
public abstract class HtmlRenderer extends Renderer
-
-
Field Summary
-
Fields inherited from class jakarta.faces.render.Renderer
PASSTHROUGH_RENDERER_LOCALNAME_KEY
-
-
Constructor Summary
Constructors Constructor Description HtmlRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getActionUrl(FacesContext facesContext)
int
getChildCount(UIComponent component)
Return the number of children of the specified component.List<UIComponent>
getChildren(UIComponent component)
Return the list of children of the specified component.protected String
getClientId(FacesContext context, UIComponent component)
Returns the client ID that should be used for rendering (ifshouldRenderId(jakarta.faces.context.FacesContext, jakarta.faces.component.UIComponent)
returns true).protected boolean
isCommonEventsOptimizationEnabled(FacesContext facesContext)
protected boolean
isCommonPropertiesOptimizationEnabled(FacesContext facesContext)
protected void
renderId(FacesContext context, UIComponent component)
Renders the client ID as an "id".protected boolean
shouldRenderId(FacesContext context, UIComponent component)
Returns true if the component should render an ID.-
Methods inherited from class jakarta.faces.render.Renderer
convertClientId, decode, encodeBegin, encodeChildren, encodeEnd, getConvertedValue, getRendersChildren
-
-
-
-
Method Detail
-
getChildren
public List<UIComponent> getChildren(UIComponent component)
Return the list of children of the specified component.This default implementation simply returns component.getChildren(). However this method should always be used in order to allow renderer subclasses to override it and provide filtered or reordered views of the component children to rendering methods defined in their ancestor classes.
Any method that overrides this to "hide" child components should also override the getChildCount method.
- Returns:
- a list of UIComponent objects.
-
getChildCount
public int getChildCount(UIComponent component)
Return the number of children of the specified component.See
getChildren(UIComponent)
for more information.
-
getActionUrl
protected String getActionUrl(FacesContext facesContext)
- Parameters:
facesContext
-- Returns:
- String A String representing the action URL
-
renderId
protected void renderId(FacesContext context, UIComponent component) throws IOException
Renders the client ID as an "id".- Throws:
IOException
-
getClientId
protected String getClientId(FacesContext context, UIComponent component)
Returns the client ID that should be used for rendering (ifshouldRenderId(jakarta.faces.context.FacesContext, jakarta.faces.component.UIComponent)
returns true).
-
shouldRenderId
protected boolean shouldRenderId(FacesContext context, UIComponent component)
Returns true if the component should render an ID. Components that deliver events should always return "true".
-
isCommonPropertiesOptimizationEnabled
protected boolean isCommonPropertiesOptimizationEnabled(FacesContext facesContext)
-
isCommonEventsOptimizationEnabled
protected boolean isCommonEventsOptimizationEnabled(FacesContext facesContext)
-
-