public abstract class DomBasicRenderer
extends javax.faces.render.Renderer
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTRIBUTES_THAT_ARE_SET_KEY |
static java.lang.String |
ICESUBMIT |
static java.lang.String |
ICESUBMITPARTIAL |
static java.lang.String |
UIFORM |
static java.lang.String |
WEB_UIFORM |
static java.lang.String |
WEB_UIJSFFORM |
| Constructor and Description |
|---|
DomBasicRenderer() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
combinedPassThru(java.lang.String passThru,
java.lang.String renderer)
This is a utility method for concatenating two Strings, where passThru
is typically null or an empty String, and renderer is usually non-null,
but can in theory be null, and we want to minimise needless new String
creation.
|
java.lang.String |
convertClientId(javax.faces.context.FacesContext context,
java.lang.String clientId) |
static java.lang.String |
converterGetAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Object currentValue) |
void |
decode(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent) |
void |
encodeEnd(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
Delegate rendering to the renderEnd(..) method after validating
parameters and before maintaining the cursor position.
|
static void |
encodeParentAndChildren(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent parent)
Recursively render the parent UIComponent instance and its children.
|
static javax.faces.component.UIComponent |
findForComponent(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
Find the UIComponent whose id is given by the for attribute of the
UIComponent parameter.
|
static javax.faces.component.UIComponent |
findForm(javax.faces.component.UIComponent uiComponent)
Given a UIComponent instance, recursively examine the heirarchy of parent
NamingContainers until a Form is found.
|
static javax.faces.component.UIComponent |
findNamingContainer(javax.faces.component.UIComponent uiComponent)
Given a UIComponent instance, recursively examine the heirarchy of parent
UIComponents until the first NamingContainer is found.
|
protected java.lang.String |
formatComponentValue(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Object currentValue)
If the parameter UIComponent instance is a ValueHolder, return the
currentValue parameter.
|
protected java.lang.String[] |
getColumnStyleClasses(javax.faces.component.UIComponent uiComponent) |
static java.lang.String[] |
getExcludesArray(java.util.Set excludes)
Retrieve the array of excluded attributes.
|
protected static javax.faces.component.UIComponent |
getFacetByName(javax.faces.component.UIComponent uiComponent,
java.lang.String name) |
protected static java.util.Map |
getParameterMap(javax.faces.component.UIComponent uiComponent)
Due to the behaviour of the UIParameter class, the names in the
name-value pairs of the Map returned by this method are guaranteed to be
Strings
|
static java.lang.String |
getResourceURL(javax.faces.context.FacesContext context,
java.lang.String path) |
java.lang.String[] |
getRowStyleClasses(javax.faces.component.UIComponent uiComponent)
This method, given a component, will return an array of the component's
row classes.
|
java.lang.String[] |
getStyleClasses(javax.faces.component.UIComponent uiComponent,
java.lang.String styleClassAttributeName) |
java.lang.String |
getValue(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
Get the submitted value from the UIComponent argument.
|
static boolean |
isStatic(javax.faces.component.UIComponent uiComponent)
A component is static if it is disabled or readonly.
|
static void |
renderAttribute(javax.faces.component.UIComponent uiComponent,
org.w3c.dom.Element targetElement,
java.lang.String attrNameInComponent,
java.lang.String attrNameInDom)
Sets a non-null, non-empty-string, UIComponent property to the
corresponding DOM Element
|
protected void |
renderEnd(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.String currentValue)
The common infrastructure of parameter validation and cursor management
will be provided by the encodeEnd method and rendering is delegated to
this method.
|
static void |
setRootElementId(javax.faces.context.FacesContext facesContext,
org.w3c.dom.Element rootElement,
javax.faces.component.UIComponent uiComponent)
Set the id of the root element of the DOMContext associated with the
UIComponent parameter.
|
void |
setSubmittedValue(javax.faces.component.UIComponent uiComponent,
java.lang.Object value)
This method should be overridden by renderers for components who subclass
UIInput
|
static void |
validateParameters(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Class validComponentType)
Validates that the facesContext is not null, the uiComponent is not null,
and that uiComponent is assignment-compatible with the
validComponentType.
|
public static final java.lang.String ATTRIBUTES_THAT_ARE_SET_KEY
public static final java.lang.String ICESUBMITPARTIAL
public static final java.lang.String ICESUBMIT
public static final java.lang.String WEB_UIFORM
public static final java.lang.String UIFORM
public static final java.lang.String WEB_UIJSFFORM
public void decode(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
decode in class javax.faces.render.Rendererpublic void setSubmittedValue(javax.faces.component.UIComponent uiComponent,
java.lang.Object value)
uiComponent - value - public void encodeEnd(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
throws java.io.IOException
encodeEnd in class javax.faces.render.Rendererjava.io.IOExceptionpublic java.lang.String getValue(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
getSubmittedValue()
method returns null or a non-String value, then an attempt is made to
obtain the value from the UIComponent's renderer. Conversion is performed
on a value obtained from the renderer.facesContext - uiComponent - protected void renderEnd(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.String currentValue)
throws java.io.IOException
facesContext - uiComponent - currentValue - java.io.IOExceptionprotected java.lang.String formatComponentValue(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Object currentValue)
throws javax.faces.convert.ConverterException
facesContext - uiComponent - currentValue - javax.faces.convert.ConverterExceptionpublic static java.lang.String converterGetAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Object currentValue)
public static javax.faces.component.UIComponent findForComponent(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent)
facesContext - uiComponent - public static java.lang.String[] getExcludesArray(java.util.Set excludes)
public static void encodeParentAndChildren(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent parent)
throws java.io.IOException
facesContext - parent - java.io.IOExceptionprotected static javax.faces.component.UIComponent getFacetByName(javax.faces.component.UIComponent uiComponent,
java.lang.String name)
public static void setRootElementId(javax.faces.context.FacesContext facesContext,
org.w3c.dom.Element rootElement,
javax.faces.component.UIComponent uiComponent)
facesContext - rootElement - uiComponent - public static void renderAttribute(javax.faces.component.UIComponent uiComponent,
org.w3c.dom.Element targetElement,
java.lang.String attrNameInComponent,
java.lang.String attrNameInDom)
uiComponent - the source of the attribute valuetargetElement - the DOM Element that will receive the
attributeattrNameInComponent - the property name in the UIComponent objectattrNameInDom - the attribute name in the DOM Elementprotected static java.util.Map getParameterMap(javax.faces.component.UIComponent uiComponent)
uiComponent - public static void validateParameters(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent uiComponent,
java.lang.Class validComponentType)
facesContext - uiComponent - validComponentType - java.lang.NullPointerException - if either of the facesContext or the
uiComponent parameters are null or
if a parent form is not
found when the given UIComponent
is a UIInput or UICommand,
IllegalArgumentException if the
validComponentType is not null and the
uiComponent is not assignable to the given
type.public static boolean isStatic(javax.faces.component.UIComponent uiComponent)
uiComponent - public static javax.faces.component.UIComponent findNamingContainer(javax.faces.component.UIComponent uiComponent)
uiComponent - public static javax.faces.component.UIComponent findForm(javax.faces.component.UIComponent uiComponent)
uiComponent - the UIComponent instanceprotected java.lang.String[] getColumnStyleClasses(javax.faces.component.UIComponent uiComponent)
public java.lang.String[] getRowStyleClasses(javax.faces.component.UIComponent uiComponent)
uiComponent - public java.lang.String[] getStyleClasses(javax.faces.component.UIComponent uiComponent,
java.lang.String styleClassAttributeName)
public static java.lang.String getResourceURL(javax.faces.context.FacesContext context,
java.lang.String path)
public static java.lang.String combinedPassThru(java.lang.String passThru,
java.lang.String renderer)
passThru - The passthru attribute from the componentrenderer - The Javascript that the Renderer needs to outputpublic java.lang.String convertClientId(javax.faces.context.FacesContext context,
java.lang.String clientId)
convertClientId in class javax.faces.render.RendererCopyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.